miwale

Watercolor Storybook — Game Art Style Spec

Transparent watercolour washes and loose, broken ink lines on warm cold-pressed paper: a living illustrated fairy-tale book.

The whole screen reads as a page of an illustrated children's book. The ground is a per-pixel pigment simulation over cream paper: terrain washes mixed subtractively, darker pigment pooled along wash edges, thin bare-paper gaps between neighbouring washes, granulation specks and pale dapples, then inked grass tufts, tiny flowers and stones on top. Characters are layered washes with soft wet-in-wet colour blooms, a paper-white highlight and a darker rim, outlined by a sepia ink line that tapers, wobbles, is thicker on the shadow side and is broken in 2–3 places. A deckled bare-paper margin frames the view. The module's cast — a pumpkin-headed child in an indigo coat and red scarf, violet-crowned root creatures with leafy tops, frosty floating ghost sheets and a huge cracked umber root creature with glowing seams — shows the look, but every element below works for any subject.

At a glance

FamilyIllustrated · Watercolor
Moodcozy, whimsical, autumnal, handmade, gentle
Best forfairy-tale top-down action games, cozy adventure and farming games, story RPG maps, storybook board games
RendererCanvas 2D, fully procedural (no image assets)
Pixel artNo — native resolution, sprites baked at 3 px per world unit
Complexity8/10 — every new asset needs several painterly iterations; init bake takes 1–3 s
FontsIM Fell English SC, Cormorant Garamond, Caveat
Key colourspaper #f5eede, sepia ink #2a1b14, meadow #b2c6a2, pumpkin #e8832f, coat #41528a, root violet #7a4a8c, gold #e6a92f

When to use it

Good fits:

Bad fits:

Color palette

SwatchHexRole
Paper#f5eedeThe white of the image; page margin, highlights, HUD panels
Sepia ink#2a1b14All contours, grass tufts, text
Blue-black ink#252c46Ink for ghost creatures and for grass inside forests
Meadow cool#b2c6a2Meadow wash, cool end (~55 % of the ground)
Meadow sap#c2cc96Meadow wash, mid hue
Meadow ochre#dace98Meadow wash, warm end
Forest payne#8e9c92Forest wash
Forest indigo#828aa2Forest wash, indigo variant
Field ochre#e9ce88Golden field wash (sienna variant #e4ba7a)
Path earth#d8b894Dirt path (dark variant #c6a280)
Pumpkin#e8832fMain character's head; light #f6b45e, shade #bf531b, rim #93380f, ribs #7e2f0e
Coat indigo#41528aMain character's coat; light #6677ad, shade #29345e, rim #1d2546
Scarf red#b4432fScarf; light #d66a48, dark #862a1e
Root violet#7a4a8cSmall creature's crown; light #a77ab5, dark #4e2a5c (alt palette #8b3d6d/#b4729a/#5a2244)
Root cream#eee0baSmall creature's body base, ochre belly blob #e3c886
Leaf green#6c8a38Leaves; light #a7bd68, dark #46602a, rim #3a4e1c
Ghost frost#d3dbe3Fast floating creature; shade #8fa0bb, deep #6a7b9e, rim #6f80a2, eyes #20263e
Umber#b06a3aLarge creature; crown #6b4a7d, belly #c99545, deep #5a2f2a, limbs #7a4e34
Glow yellow#ffcf55Carved eyes/mouths; core #fff6cf, rim #e0661f; large-creature cracks #ffc548/#fff0b0
Gold#e6a92fSmall collectibles; light #fbe39c, rim #9a5a14; top bar #dca23a
Alizarin red#c23b2bRed bar and heart icon; accent counters #9e2a1c; red edge tint rgb(178,44,34)

Palette rules:

Typography

Text effects: HUD text over the map gets a paper halo text-shadow: 0 0 3px #f5eede, 0 0 7px #f5eede, 0 0 12px rgba(245,238,222,.8) (never a dark drop shadow). In-world numbers: paper-coloured stroke rgba(246,239,224,.9) 2.4–3 px under the ink fill, rotated ±0.14 rad. Text over dark modal veils turns paper-coloured #f5eede with 0 1px 4px rgba(30,18,8,.85).

Rendering technique

World space: 360 world units visible vertically; light from the upper left (LX, LY) = (-0.6, -0.8).

Baked at init (1–3 s total):

  1. Noise textures (tileable Float32 fields in [0,1]): white noise → 3 passes of wrap-around box blur → normalise → sum of layers → 0.5 + v / 4.6. PAP 256² (paper tooth, radii 1/2/6), GRA 256² (granules, radii 0/1), WA and WB 1024² (wash flow, radii 4/12/34 and 6/18/46), STR 256² (horizontal streaks). Plus an EXP[i] = exp(-i/512) lookup (4097 entries).
  2. Grain canvas 256²: v = 255 - max(0, GRA-0.46)*190 - max(0, 0.5-PAP)*60 (slightly warm), used as a multiply pattern on every sprite wash.
  3. Character frames with mkSprite(wu, hu, ax, ay) at K = 3 px/unit: main character 3 idle + 4 walk × 3 boil = 15 frames (30×35 units, anchor 15.5/32.5); small creature 2 palettes × 4 poses × 2 boils (26×37); ghost creature 4×2 (26×28); large creature 4×2 (50×58). Each also gets a mirrored copy, a white "flash" copy (pixels with luminance > 0.14 pushed to paper), a 4 px blurred "soft" copy for the appear effect and 4 dissolve frames for the dissolve-out.
  4. Props (25 sprites), FX sprites (paint dots, splats, ring, star, smear, glow halos, appear stains), HUD textures (paper tile, ink frames, wash bars, plaque, banners, deckled cards) and icons.

Per frame (draw order):

  1. Ground chunks (256 units, per-pixel shader at ≤ 2.5 px/unit, built incrementally by a generator with a 5 ms/frame budget).
  2. Ground overlay: landed paint drops as flattened stains, bloom rings, appear puddles, warm light pools under orbiting lanterns.
  3. Collectibles (baked gold drop / star with a soft indigo shadow sprite).
  4. Shadows: every actor appends an ellipse to one Path2D; it is filled once in rgba(50,54,92,0.2) (floating actors in a second path at 0.11) right before the first sprite draws — overlapping shadows don't double up.
  5. Y-sorted props, creatures and main character as baked sprites (drawImage). Additive glow sprites over carved faces, the large creature's core and lanterns.
  6. Projectiles, particles, floating counters.
  7. Screen overlay: the cached deckled page margin, drawn only as 4 edge strips (band = 11 % of height); a red-tinted version with alpha = tint strength.

Resolution rules: no pixel snapping, smoothing on. Sprite pixel density (3 px/unit) roughly equals screen density at 1080p; ground caps at 2.5 px/unit; collectibles bake at 4 px/unit, small FX at 4–6.

World and ground

The ground is a custom per-pixel watercolour shader over paper #f5eede, not a texture blend. It paints four terrain washes — meadow (#b2c6a2 / #c2cc96 / #dace98), forest (#8e9c92 → #828aa2), golden field (#e9ce88 → sienna #e4ba7a) and dirt path (#d8b894 → #c6a280) — and is baked into 256-unit chunks.

Ground decals (drawn into the chunk with ink/wash helpers, via a seamless jittered-grid scatter so chunk borders match):

The ground keeps its darkest marks (grass) at ≤ 45 % alpha so characters and props on top stay readable.

Characters

Shared construction: every part is wash() (base fill + 2–3 blurred wet-in-wet blobs + paper highlight + blurred darker rim + grain multiply, offset 0.45/0.35 units) followed by outline() (a broken sepia ink contour, width 0.5–0.95, light 0.45–0.55, 2–3 pieces). Control points are jittered 0.12–0.28 units per frame variant (jit), so each "boil" frame is a fresh hand-drawn take. Storybook proportions: big round head (about half the height), small body, stubby legs. Faces are carved glowing shapes (warm yellow wash #ffcf55, white-hot core #fff6cf, orange rim #e0661f, thin ink) or ink dots with heavy tapered brows, readable at 3 px per unit. Each character stands on an indigo glaze shadow ellipse.

Main character (pumpkin-headed child in an indigo coat and red scarf, ~18 units wide, ~30 tall, feet at 0,0, facing right):

Small creature (violet-crowned root creature with a leafy top, r 9): two root legs (ink strokes 1.25 wide, toes), body 10-point spline (≈17×19 units) washed cream #eee0ba with a large violet crown blob (rx 10.6, blur 2), lilac light and plum dark blobs, ochre belly #e3c886; skin-ring strokes; 3 leaf ribbons on top that sway; angry glowing almond eyes with ink pupils and heavy tapered brows (0.85–0.95 wide); jagged frown. Body rocks ±0.075 rad with the walk. Two palettes: violet #7a4a8c/#a77ab5/#4e2a5c and magenta-plum #8b3d6d/#b4729a/#5a2244. Shadow r*0.95 × r*0.34.

Fast creature (frosty floating ghost sheet, r 7): 13-point wavy sheet with 3 trailing points that ripple; frost wash #d3dbe3 with blue shade blobs (#8fa0bb, deep #6a7b9e), feather: 0.85 (blurred clip → soft edge), 12 salt spots, lost-and-found blue-black ink #252c46 only on 3 arcs of the outline (rim #6f80a2), blurred hollow eyes and gaping mouth (#20263e), reaching arm with 3 claw strokes. Drawn at 90 % alpha, floating; lighter shadow 5.2×1.9 at 0.11.

Large creature (huge cracked umber root creature, r 17): 18-point body (34×37 units) in umber #b06a3a with a violet crown blob #6b4a7d, ochre belly #c99545, dark side #5a2f2a; moss patch; two hatching passes (angles −1.0 and 0.55, spacing 1.15/1.4) on the shadow side; 4 glowing cracks (blurred #ffc548 1.5 wide + #fff0b0 0.4 core + offset ink) from a glowing core; glowing eye sockets; thick brow stroke 1.55; withered leaf crown; massive arms and legs (ribbons 5–5.6 wide, #7a4e34). Additive pulsing core glow per frame.

Readability against the busy ground: characters are more saturated and darker than any ground wash, carry a full-value ink contour that is heaviest at the bottom-right, and stand on an indigo shadow glaze. Give each creature type its own hue family (violet, frost-blue, umber) so groups stay distinguishable.

Props

All 25 prop sprites are baked once at 3 px/unit with the same wash + broken-outline toolkit; mirrored variants come from flipping the canvas. Each prop stands on its own indigo glaze shadow ellipse (part of the shared shadow Path2D).

Prop rules: same light direction as everything else (light blob top-left, dark/indigo glaze bottom-right), ink weight slightly lighter than characters so characters read in front, autumn colours from the leaf-litter range.

Effects and particles

All effects are pre-baked sprites in the same wash + ink language — paint, never light.

Atmosphere and lighting

UI

.hud-bar { position: relative; height: 22px; background: rgba(245,238,222,.62);
  border: 1.5px solid rgba(42,27,20,.9);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px; }
.hud-bar > .fill { height: 100%; background: linear-gradient(90deg, #c23b2b, #d8483a 40%, #9a2418); }
.hud-text { font: 400 19px 'IM Fell English SC', Georgia, serif; color: #2a1b14;
  text-shadow: 0 0 3px #f5eede, 0 0 7px #f5eede, 0 0 12px rgba(245,238,222,.8); }
.hud-label { font: 700 20px 'Caveat', 'Segoe Print', cursive; color: #8a3a1e; }
.panel { background: #f5eede; color: #2a1b14; border: 1.5px solid rgba(42,27,20,.85);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  box-shadow: 0 3px 12px rgba(60,40,20,.3); padding: 6px 24px; }
.card { width: 224px; min-height: 292px; padding: 34px 24px 28px; background: #f5eede;
  filter: drop-shadow(0 8px 10px rgba(30,18,8,.45)); transform: rotate(-1.4deg); }
.card .name { font: 400 23px 'IM Fell English SC', serif; }
.card .desc { font: italic 600 18px 'Cormorant Garamond', serif; color: #5b3a24; }
.card .key  { font: 700 24px 'Caveat', cursive; color: #a3532c; }
.veil { background: radial-gradient(ellipse at 50% 46%, rgba(245,238,222,.28), rgba(58,40,26,.68) 78%); }

For the bar fills, the module bakes a wash texture (see wash()) to a data-URL and uses it as background, with a ragged-edge PNG mask on the right end.

Motion and animation

Do and don't

Do:

Don't:

Implementation recipe

  1. Set up a 360-unit-tall world camera; choose 3 px/unit for sprite bakes.
  2. Build the noise textures (noiseTex: white noise → box blur ×3 → normalise) for paper, granules and two wash-flow fields, the EXP table and the grain canvas.
  3. Implement the brush toolkit: spline (Catmull-Rom), jit, blobPts, ribbon, inkLine (filled variable-width ribbon), outline (broken contour), wash (scratch canvas: fill → blobs → highlight → rim → grain → clip/feather → offset composite), glowShape.
  4. Write each character as a function (ctx, pose, rng) in world units with feet at (0,0): back parts first, each part = wash + outline. Use the palette triplets (base / light / dark / rim).
  5. Bake frames: for every pose × boil variant create a sprite with a different seed; also mirrored, flash and (optionally) dissolve copies.
  6. Write the ground shader: world fields on a coarse grid → signed distances → per pixel edge noise, coverage, pooling, gaps, dapples, granulation → absorbance mix → paper * exp(-A). Then scatter decals (blooms, stones, grass tufts, flowers) with a jittered-grid scatter seeded per cell. Cache per chunk (or once for a fixed screen).
  7. Bake props with the same toolkit; give each a shadow ellipse size.
  8. Per frame: blit ground, fill the shadow union once, draw y-sorted sprites, additive glows, projectiles, particles, counters.
  9. Build the page-margin overlay once per screen size (only the edge bands) and blit it last.
  10. Do the HUD as washes inside hand-inked frames with IM Fell English SC / Cormorant Garamond / Caveat.
  11. Test readability with a big crowd: if creatures merge, push their ink weight up, separate hues per type, and lower ground decal alpha.

Code

The snippets below are ported from the module and run on their own. starter.js in this folder combines them into a full working scene (ground shader, main character, small root creatures, ghost creatures, collectibles, projectile, HUD, page margin). The complete implementation (large creature, props, icons, HUD textures, particles) is in ../../js/styles/watercolor.js.

Variable-width ink line (the core of every contour):

const LX = -0.6, LY = -0.8; // towards the light
function inkLine(ctx, P, o) {           // P = dense points, o = {w, ta, tb, wv, ph, light, cx, cy, color, alpha}
  const n = P.length; if (n < 2) return;
  const acc = [0];
  for (let i = 1; i < n; i++) acc[i] = acc[i - 1] + Math.hypot(P[i][0] - P[i - 1][0], P[i][1] - P[i - 1][1]);
  const tot = acc[n - 1] || 1, ta = o.ta ?? 0.2, tb = o.tb ?? 0.3, wv = o.wv ?? 0.3, ph = o.ph || 0, L = [], R = [];
  for (let i = 0; i < n; i++) {
    const a = P[Math.max(0, i - 1)], b = P[Math.min(n - 1, i + 1)];
    const l = Math.hypot(b[0] - a[0], b[1] - a[1]) || 1, tx = (b[0] - a[0]) / l, ty = (b[1] - a[1]) / l, u = acc[i] / tot;
    let w = o.w;
    if (u < ta) w *= 0.2 + 0.8 * Math.sqrt(u / ta);                       // pen lands
    if (u > 1 - tb) w *= 0.1 + 0.9 * Math.sqrt(Math.max(0, 1 - u) / tb); // pen lifts
    w *= 1 + wv * (0.6 * Math.sin(acc[i] * 0.8 + ph) + 0.4 * Math.sin(acc[i] * 2.1 + ph * 2.3)); // pressure
    if (o.light) { const nx = P[i][0] - o.cx, ny = P[i][1] - o.cy, nl = Math.hypot(nx, ny) || 1; w *= 1 - o.light * (nx * LX + ny * LY) / nl; }
    w = Math.max(0.04, w) / 2;
    L.push([P[i][0] - ty * w, P[i][1] + tx * w]); R.push([P[i][0] + ty * w, P[i][1] - tx * w]);
  }
  const Q = L.concat(R.reverse());
  ctx.beginPath(); ctx.moveTo(Q[0][0], Q[0][1]); for (const p of Q) ctx.lineTo(p[0], p[1]); ctx.closePath();
  ctx.globalAlpha = o.alpha ?? 1; ctx.fillStyle = o.color || '#2a1b14'; ctx.fill(); ctx.globalAlpha = 1;
}

Broken contour around a closed ring (pen lifted 2–3 times, small overshoots):

function outline(ctx, P, o, rnd) {      // rnd = seeded () => [0,1)
  const n = P.length, pieces = o.pieces || 2;
  let cx = 0, cy = 0; for (const p of P) { cx += p[0] / n; cy += p[1] / n; }
  let s = (rnd() * n) | 0, rem = n;
  for (let i = 0; i < pieces; i++) {
    const len = i === pieces - 1 ? rem : Math.round(rem / (pieces - i) * (0.75 + rnd() * 0.5));
    rem -= len;
    const seg = [];
    for (let j = 0; j < len + Math.round((rnd() - 0.3) * 4); j++) seg.push(P[(s + j) % n]);
    if (seg.length > 1) inkLine(ctx, seg, { cx, cy, ta: 0.12, tb: 0.16, light: 0.45, ...o, ph: rnd() * 10 });
    s += len;
  }
}

Sprite wash on a scratch canvas (wet-in-wet blobs, highlight, pooled rim, granulation, misregistration):

let SCR = null; const MIS = [0.45, 0.35];
function wash(ctx, P, o, grain /* 256² multiply canvas, see starter.js */) {
  const cv = ctx.canvas, m = ctx.getTransform(), k = Math.hypot(m.a, m.b);
  if (!SCR || SCR.width !== cv.width || SCR.height !== cv.height) { SCR = document.createElement('canvas'); SCR.width = cv.width; SCR.height = cv.height; }
  const t = SCR.getContext('2d'), path = () => { t.beginPath(); t.moveTo(P[0][0], P[0][1]); for (const p of P) t.lineTo(p[0], p[1]); t.closePath(); };
  t.setTransform(1, 0, 0, 1, 0, 0); t.globalCompositeOperation = 'source-over'; t.clearRect(0, 0, cv.width, cv.height); t.setTransform(m);
  let x0 = 1e9, y0 = 1e9, x1 = -1e9, y1 = -1e9; for (const p of P) { x0 = Math.min(x0, p[0]); y0 = Math.min(y0, p[1]); x1 = Math.max(x1, p[0]); y1 = Math.max(y1, p[1]); }
  path(); t.fillStyle = o.c; t.fill();
  t.globalCompositeOperation = 'source-atop';                       // everything below stays inside the shape
  for (const b of o.blobs || []) { t.filter = `blur(${(b.blur ?? 2) * k}px)`; t.globalAlpha = b.a ?? 0.7; t.fillStyle = b.c; t.beginPath(); t.ellipse(b.x, b.y, b.rx, b.ry ?? b.rx, 0, 0, Math.PI * 2); t.fill(); }
  t.filter = 'none'; t.globalAlpha = 1;
  const lx = x0 + (x1 - x0) * 0.3, ly = y0 + (y1 - y0) * 0.26, g = t.createRadialGradient(lx, ly, 0, lx, ly, Math.max(x1 - x0, y1 - y0) * 0.62), ha = o.hi ?? 0.4;
  g.addColorStop(0, `rgba(255,251,238,${ha})`); g.addColorStop(0.55, `rgba(255,251,238,${ha * 0.35})`); g.addColorStop(1, 'rgba(255,251,238,0)');
  t.fillStyle = g; t.fillRect(x0 - 2, y0 - 2, x1 - x0 + 4, y1 - y0 + 4);
  t.filter = `blur(${0.55 * k}px)`; t.globalAlpha = o.rimA ?? 0.6; t.strokeStyle = o.edge || o.c; t.lineWidth = o.rim ?? 1.4; path(); t.stroke();
  t.filter = 'none'; t.globalAlpha = o.gran ?? 0.55;
  if (grain) { t.setTransform(1, 0, 0, 1, 0, 0); t.globalCompositeOperation = 'multiply'; t.fillStyle = t.createPattern(grain, 'repeat'); t.fillRect(0, 0, cv.width, cv.height); t.setTransform(m); }
  t.globalAlpha = 1; t.globalCompositeOperation = 'destination-in'; path(); t.fillStyle = '#000'; t.fill(); // clip (grain spilled outside)
  ctx.save(); ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.drawImage(SCR, Math.round(MIS[0] * k), Math.round(MIS[1] * k)); ctx.restore();
}

Ground pigment mixing core (per pixel; eX = noisy signed distance to each terrain edge in world units):

const PAPER = [245, 238, 222];
const ab = (rgb) => rgb.map((v, i) => -Math.log(Math.max(4, v) / PAPER[i]));   // colour -> absorbance
const MEADOW = ab([178, 198, 162]), PATH = ab([216, 184, 148]);
const sst = (t) => t <= -1 ? 0 : t >= 1 ? 1 : ((t + 1) / 2) ** 2 * (2 - t);     // smoothstep on [-1,1]
const pool = (d) => d <= 0 || d >= 2.6 ? 0 : (1 - d / 2.6) ** 2 * (d < 0.35 ? d / 0.35 : 1);
function shadePixel(eP, wa, gr, pap, out) {   // eP > 0 inside the path; wa/gr/pap = flow, granule, paper noise in [0,1]
  const wP = sst(eP / 0.5), wM = 1 - wP;
  const kM = 1 + 0.5 * pool(-eP), kP = 1 + 0.9 * pool(eP);                         // pigment pools at both edges
  const gap = Math.max(0, Math.min(1, (wa - 0.55) * 7)) * Math.max(0, 1 - Math.abs(eP) / 0.75) * 0.6;
  const gran = (1 + (gr - 0.5) * (0.6 * wM + 1.2 * wP)) * (1 + (0.5 - pap) * 0.45), mul = (1 - 0.88 * Math.min(1, gap)) * gran;
  for (let k = 0; k < 3; k++) {
    const A = wM * kM * 0.9 * mul * MEADOW[k] + wP * kP * (0.82 + 0.35 * wa) * mul * PATH[k];
    out[k] = PAPER[k] * (0.95 + 0.075 * pap) * Math.exp(-A);                       // Beer-Lambert over paper
  }
}

Adapting it to your project

Keep fixed: paper #f5eede and its texture, sepia ink, the wash recipe (base + 2–3 blobs + highlight + rim + grain + offset), broken tapered contours thicker on the shadow side, indigo glaze shadows, absorbance-space ground mixing with pooled edges, the page margin and the three fonts.

May change:

Performance notes

Copy-paste prompt

Use the Watercolor Storybook art style for my project:
- Canvas 2D, procedural, 360 world units tall; light from the upper left; bake everything at init.
- Paper #f5eede is the white; ink is sepia #2a1b14 (blue-black #252c46 for cold things), never black.
- World: per-pixel watercolour shader. Mix terrain washes in absorbance space (paper*exp(-A)),
  darken pigment pooling within 2.6 units inside every wash edge, leave 0.75-unit paper gaps,
  add granulation and pale dapples; keep it light and low-chroma (meadow #b2c6a2/#c2cc96, path #d8b894).
- Ground decals: inked grass tufts (3-5 tapered blades, 45 % alpha), tiny flowers, stones, bloom rings.
- Every shape = wash (base + lighter top-left blob + darker bottom-right blob, radial paper highlight,
  blurred darker rim, grain multiply) offset 0.45/0.35 units from a tapered, wobbling ink contour
  broken into 2-3 pieces and thicker on the shadow side (0.7-0.95 units for bodies).
- Characters: big heads, chunky storybook silhouettes; carved glowing yellow (#ffcf55/#fff6cf) faces.
- Bake 4 walk poses x 2-3 "boil" variants (re-jittered strokes) and cycle boils at 5-6 fps.
- Props: autumn trees, firs, bushes, haystacks, fences in the same wash + broken ink, indigo glaze lower right.
- Atmosphere: one indigo glaze shadow rgba(50,54,92,0.2) union of ellipses per frame; warm additive glows only
  on carved faces and lanterns; a deckled bare-paper margin frames the screen.
- Effects: paint splats, paint drops that land as stains, bloom rings, dry-brush trails, gold stars.
- UI: wash bars in hand-inked frames, deckle-edged paper cards.
- Fonts: IM Fell English SC (titles/numbers), Cormorant Garamond (body), Caveat (handwritten labels).