Skip to content

Razshy/Wiggle / mnt-skills/examples/paint

Paint an original image in a watercolor style by writing code, not by calling an image model. Use when the user asks you to draw, paint, sketch, or make a picture of something and there is no image-generation tool available, or when they ask for a painting, watercolor, or illustration you can iterate on. Do not use for charts, diagrams, UI mockups, or requests to edit an existing photograph.

FileKindSize
LICENSE.txtmarkdown11.1 KB
SKILL.mdskill md3.2 KB
examples/full_scene.pyscript24.0 KB
paintkit/__init__.pyscript644 B
paintkit/toolkit.pyscript63.0 KB
reference.mdmarkdown3.3 KB
render.pyexecutablescript2.5 KB

reference.md

View on GitHub
# paintkit reference

`Canvas` is an imperative watercolor surface. Primitives are ROI-scoped and
composite as multiplicative glazes (pigment darkens paper) or alpha-over
(opaque marks). Colors are RGB in [0,1]; `hex_rgb("#rrggbb")` converts.

```python
from paintkit import Canvas, hex_rgb

def paint(cv: Canvas):
    cv.paper_texture(strength=0.05)
    cv.wash(0, 400, hex_rgb("#a7c4d8"), hex_rgb("#e8d7b8"))
    cv.watercolor_blob(cv.ellipse_points(800, 200, 220, 90),
                       hex_rgb("#ffffff"), layers=5, alpha=0.12)
    # ... more primitives
```

`render.py` calls `paint(cv)` on a fresh `Canvas(width, height, seed)` and
writes the result. All geometry randomness derives from the seed, so a
re-render with the same seed reproduces the same painting.

## Primitives

| method | args | for |
|---|---|---|
| `paper_texture` | `strength` | fibrous cold-press grain over the whole sheet |
| `wash` | `y0, y1, top, bot, alpha, x0, x1, mottling, wobble, softness, glazes, feather` | graded background wash between two colors |
| `watercolor_blob` | `pts, color, layers, alpha, softness, depth, variance, granulation, edge, mode` | the core wet shape: deformed polygon, layered, granulated, dark-edged |
| `stroke` | `pts, color, width, taper, alpha, softness, wobble, texture, mode` | one loaded-brush line |
| `strokes` | `paths, color, width, taper, alpha, softness, wobble, texture, mode` | many strokes in one batched call |
| `dabs` | `rects, color, alpha, softness, granulation, mode` | rectangles as soft glazes (windows, bricks) |
| `scatter` | `xs, ys, radii, color, alpha, softness, mode` | many small circles (leaves, gravel) |
| `spray` | `cx, cy, rx, ry, color, count, dot, alpha, falloff, softness, mode` | airbrush ellipse (mist, fur, foam) |
| `outline` | `pts, color, width, softness, alpha, closed` | hard ink line, usually white or sepia |
| `flat_shape` | `pts, color, alpha, softness, granulation, edge, mode` | filled polygon, no deformation |
| `glaze` / `over` / `tint` | `alpha, color` | full-frame composite of a mask you built yourself |

`mode` is `"glaze"` (multiplicative, the watercolor default) or `"over"`
(opaque). `pts` is an (N,2) array of pixel coordinates.

## Helpers

| method | returns |
|---|---|
| `ellipse_points(cx, cy, rx, ry, n, jitter, angle)` | polygon approximating an ellipse |
| `deform_polygon(pts, depth, variance)` | recursively wobbled polygon |
| `polygon_alpha(pts, softness)` | soft filled-polygon mask |
| `granulate(alpha, ...)` / `edge_darken(alpha, ...)` | apply the wash effects to a mask you built |
| `to_uint8()` | flush and return the (H, W, 3) uint8 RGB image |
| `hex_rgb("#rrggbb")` | (r, g, b) in [0,1] |

## Randomness

`Canvas.rng` is the geometry stream (polygon deformation, jitter, wobble,
spray positions, and anything the scene draws itself). Use `cv.rng.uniform`,
`cv.rng.integers` etc. for procedural placement so the scene stays
reproducible. Texture noise (granulation, paper) comes from a fixed
scene-independent bank and does not consume the geometry stream.

## Budget

The container has one CPU and a 300 s wall clock per call. A full 18-element
scene renders in about a second at 1600×900 sequential.
Prefer `--scale 0.5` while iterating. `examples/full_scene.py` in this skill
directory is a worked 18-element scene using every primitive; read it for
patterns before writing your own.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall