Digital paper marbling for the web
Ink dropped on a bath, pushed into rings and combed into feathered patterns, done in code. How marbling works, a canvas starter that drops and combs ink, and the skill that marbles a sheet beside your headline.
Free skills to start. Pro is $79 a year for every skill, or $9.99 a month for 10. See pricing
What is a paper marbling?
Paper marbling is an old bookbinding craft. A marbler floats inks on a thick bath, drops color after color so each drop pushes the earlier ones aside into rings, then draws a stylus or comb through the bath to pull the rings into chevrons, waves and feathered nonpareil patterns. A sheet of paper laid on top picks the pattern up.
The same process can be done exactly in math, because ink on a bath does not mix: every drop and every stroke of the comb just moves the ink that is already there. That makes digital marbling look hand-made rather than random, which suits stationery, books, crafts, coffee, fashion and anything that sells patience.
How the effect works
A new drop of radius r at point c moves every existing point p straight away from c, to c + (p − c) × √(1 + r² / |p − c|²). Points near the drop move a lot, far ones barely move, and nothing crosses, so the earlier inks become rings. Draw each ink as a polygon and apply that formula to its vertices.
A straight comb stroke shifts points along the stroke direction by an amount that falls off with distance from the line: shift = z × u^d, where d is the distance, z the strength and u a number just under 1. Several strokes side by side, or back and forth, give the classic patterns.
01
Store each ink as a polygon
A circle of 200 or so points per drop. More points keep curves smooth after many strokes.
02
Displace on every drop
Before adding a new drop, push every vertex of every earlier ink away from its center.
03
Comb with tine strokes
Shift vertices along the stroke, by an amount that fades with distance from the tine.
04
Add points where it stretches
Long thin veins need extra vertices, or straight segments show.
HTML
Ink drops and a comb stroke on a canvas
Drops eight inks, then pulls one comb stroke through the bath, using the displacement formulas above. Click to drop more ink where you click.
<canvas id="bath" width="800" height="600" style="width:100%;max-width:800px;background:#f3ead8"></canvas>
<script>
const canvas = document.getElementById('bath')
const g = canvas.getContext('2d')
const INKS = ['#24306b', '#9b2f2b', '#c9962e', '#f6f1e6', '#3f7a6b']
let drops = [] // { color, pts: [[x, y], ...] }
function drop(cx, cy, r, color) {
for (const d of drops) for (const p of d.pts) {
const dx = p[0] - cx, dy = p[1] - cy, d2 = dx * dx + dy * dy
const k = Math.sqrt(1 + (r * r) / d2)
p[0] = cx + dx * k; p[1] = cy + dy * k
}
const pts = []
for (let i = 0; i < 240; i++) {
const a = (i / 240) * Math.PI * 2
pts.push([cx + Math.cos(a) * r, cy + Math.sin(a) * r])
}
drops.push({ color, pts })
}
function tine(x0, z = 80, u = 0.97) {
// A vertical stroke at x = x0, moving ink downward.
for (const d of drops) for (const p of d.pts) {
p[1] += z * Math.pow(u, Math.abs(p[0] - x0))
}
}
function draw() {
g.fillStyle = '#f3ead8'; g.fillRect(0, 0, canvas.width, canvas.height)
for (const d of drops) {
g.fillStyle = d.color
g.beginPath()
d.pts.forEach(([x, y], i) => (i ? g.lineTo(x, y) : g.moveTo(x, y)))
g.closePath(); g.fill()
}
}
for (let i = 0; i < 8; i++) drop(400, 300, 40 + i * 6, INKS[i % INKS.length])
tine(400)
draw()
canvas.addEventListener('click', (e) => {
const b = canvas.getBoundingClientRect()
const s = canvas.width / b.width
drop((e.clientX - b.left) * s, (e.clientY - b.top) * s, 30, INKS[drops.length % INKS.length])
draw()
})
</script>A starting point written for this page, free to use in your own projects. The skills below build the finished version with checks, fallbacks and a recorded video.
What to get right on a real page
01
Use a real marbler’s palette
Indigo, madder red, ochre, chalk white and a green read as marbling. Neon colors read as a lava lamp.
02
Keep the paper warm
An off-white or cream ground with a little texture sells it as paper, not a screen.
03
Leave a quiet area for the copy
Marbled patterns are busy all over. Put the headline on a plain panel beside the sheet, not on top of it.
04
Show the finished sheet for reduced motion
Respect prefers-reduced-motion: show one finished frame instead of the loop. A visitor who turned motion off still gets the look.
Skills that build a paper marbling
A finished hero that marbles a sheet beside your headline, with your inks, fonts, logo and words, and a 1080p video for launch posts.
- Paper Marbling HeroClaude CodeCodexCursor+3 more agents
Motion Heroes · Pro
Paper Marbling Hero
Animated WebGL hero · page + embed + 1080p video
Drops of your inks land on the bath and push each other into rings, then a comb is drawn through with its pins visible, pulling them into chevron, nonpareil, wave or bouquet patterns with fine dark veins. A strip of paper skims the bath and the next sheet starts, while a row of named ink swatches lights up as each ink drops.
Worth knowing: It marbles in a WebGL shader with four fixed patterns, not free-form strokes you draw yourself.
Needs: Node.js 18+, Chrome (or Chromium/Edge), and ffmpeg for the video
See what Paper Marbling Hero makes
Install
Build a paper marbling with your agent
Each skill is a SKILL.md folder, so it installs the same way in Claude Code, Codex, Cursor and other agents. The example below uses Paper Marbling Hero; each skill page has its own prompt.
1. Paste the install prompt
Your agent runs the installer. The first time, it shows a sign-in link so you can approve it in the browser.
Install the "Paper Marbling Hero" skill from Lookbk (https://lookbk.dev/skills/paper-marbling-hero). 1. Run: curl -fsSL https://lookbk.dev/cli.js | node - add paper-marbling-hero 2. If it prints a sign-in link, show it to me. When I say I approved it, run the same command again. 3. When the install finishes, read the SKILL.md it installed and tell me what you need from me to make the first result.
Or run it in a terminal
curl -fsSL https://lookbk.dev/cli.js | node - add paper-marbling-hero2. Start a new session
Agents load skills when a session starts. The installer writes the folder where your agent looks:
- Claude Code
- ~/.claude/skills/paper-marbling-hero
- Codex
- ~/.agents/skills/paper-marbling-hero
- Cursor
- ~/.agents/skills/paper-marbling-hero
3. Ask for the result
Describe it in plain words, for example:
Build a Paper Marbling hero for Quire & Comb, our hand-marbling bindery: indigo, madder, ochre, chalk and verdigris inks on a warm paper wall, nonpareil pattern, headline 'Every sheet, pulled once.', and record a 12-second video.
Another agent? Install a skill in any agent
FAQ
Questions
Still stuck? The guides cover installing, agents and licensing in more detail.
Read the guidesIs digital marbling the same as a fluid simulation?
No. A fluid simulation solves how liquid flows over time and mixes. Marbling math only moves ink that is already there, drop by drop and stroke by stroke, so it never smears and stays crisp at any size.
How do I make the nonpareil pattern?
Drop rings of several inks, comb back and forth with widely spaced tines to make waves, then comb once more with closely spaced tines in one direction. The fine teeth make the feathered look.
Can I make marbled paper patterns to print?
Yes. Draw the polygons onto a large canvas or export them as SVG paths; because the shapes are vectors, they stay sharp at print size.
Does the marbling hero work as a video?
Yes. Paper Marbling Hero records a frame-exact 1080p video of the sheet being marbled, for posts and places where scripts are not allowed.
