Draw
Looks
New in Levni 0.6.0 "look" needs 0.6.0 or newer.
A look draws the same scene in another illustration language. Add one field and every drawing in the scene is inked again: the line, the fills, the palette and the ground. The drawings stay the same; the hand changes. See them side by side at levni.dev/looks.
{ "look": "halftone", "elements": [ … ] }
npx @levni/levni render scene.json out.png --look stamp
npx @levni/levni animate scene.json loop.gif --look marker
The looks#
| look | line | fills | palette |
|---|---|---|---|
halftone |
black, a little thinner | every colour becomes a field of halftone dots, darker colours denser; panels and discs too | black on warm paper, no colour |
one-line |
thin, clean, continuous | two flat patches (warm and cool), slipped out of register behind the line; grounds soften | black, coral, periwinkle |
marker |
fat black marker | one mint second ink, printed a little off the line | black and mint on white |
cutout |
none on filled shapes | flat paper shapes; blue and ink become solid black | denim, leaf, sun, tomato |
airy |
thin indigo, clean | white, except coral as the only colour; grounds soften | indigo, coral, white |
stamp |
heavy | flat, two inks | terracotta and dark brown on cream |
mono |
dark green | every colour mapped onto one green ramp | mint to forest |
Without a look, Levni draws in its house style: a hand-inked crayon line, riso inks slightly out of register, paper grain.
What a look changes#
- Drawings (every Folio drawing, pack drawings, your own
drawelements): line weight and colour, hand-inked or clean, and how fills are treated. - The scene's shapes (panels, discs, blocks and other elements with a
color): the halftone look dots them, the soft looks (one-line,airy) take their light tones, the others reprint them in the look's palette. - Palette and ground: the look's inks replace the house colours, and the background defaults to the look's ground.
Your own style inks still win, colour by colour, so a look can carry your brand. Text keeps its font; only its colour follows the palette.
The critic#
A look can only reprint colour names (ink, blue, coral, tone-mustard…). When a scene with a look uses a raw hex value, the critic says so: colour #FF00AA is outside the Stamp look: name a house colour so the look can reprint it.
From code#
import { compose, LOOKS, LOOK_IDS } from '@levni/levni';
const { svg } = await compose({ ...scene, look: 'one-line' });
LOOKS holds each look as data (its label, palette, line and fill rules), so a tool can list them.
The skill#
levni-looks tells an agent which look fits which job, what each one needs from a scene, and how to check the result.