算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
illustration-framed-panel【设计与创意】Draws original design-and-coding scenes as SVG cards (480x360) in a framed-panel cartoon style. Identifying traits are a soft pastel card with a periwinkle-violet panel framed in thin navy, outline-only clouds and a pale lavender floor band with dashes inside it; L-shaped corner brackets outside two corners; white speech bubbles, UI cards and bushes …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
A cartoon person at work inside a violet "window", painted on a pastel card. The panel gives the scene a stage, and the UI bubbles and bushes that spill over its edge make it feel lively rather than boxed. Use it for friendly product and team moments: support, live streams, design work, onboarding.
Boundary: for people without a frame on a plain white background with inked outlines and big heads, use illustration-outlined-cartoon. For flat shapes with no outlines and floating confetti, use illustration-flat. For a single object with no person, use illustration-teal-spot.
Extracted from a set of 42 original design-and-coding cards in 14 styles; the three cards in examples/ are this style's shipped cards.
A fixed violet panel with a thin navy frame sits on a pastel card, with outline clouds and a dashed lavender floor inside it, and the scene's white bubbles, UI cards and leaves break out across its edge.
Measured from the examples. Every card uses the navy line, the panel set and the bubble set; pick one card pastel.
| Role | Hex | Where it goes |
|---|---|---|
| Card: peach / orchid / sky cyan | #F7D8B5 / #DFA5D4 / #A7E0ED | full-bleed card, one per card |
| Bracket and outside marks | #9C878C / #A3739B / #6E9FAD | brackets on the matching pastel |
| Navy line | #2E2A5C | every outline, clouds, hatch marks, eyes, bold UI text |
| Panel | #8A80EA | panel fill (also a UI accent: slider, swatch) |
| Floor band / floor dashes | #D0CCF4 / #8F88D6 | floor rect y 256–312, its short dashes |
| Contact shadow | #B5AEEA | flat ellipses under feet, chairs, beanbags |
| Bushes | #BACCA6, #A9C094 front layer | scalloped bushes on the floor line |
| Hair / hair highlight | #433D71 / #7C74C4 | all hair; highlight strokes; folds on dark fabric |
| Skin (three tones) | #EDB0A2, #F0BFA4, #D49A80 | face, neck, hands |
| Blush | #E8878A at opacity 0.5–0.6 (on #D49A80 skin: #C46A5C at 0.55) | cheek ellipses, tongue line |
| Mouth | #9A3E52 (#8A3A48 on tan skin) | open smile |
| Tops | mustard #EDB24F (cuff #E0A23E), mint #95D1B3 (shade #79BC9C), orange #EE8A6E (shade #D9735A) | sweaters, hoodies, cardigans |
| Trousers | #6A63B0 (folds #A29DDA), #4A4488 (folds #7C74C4) | jeans |
| Cream / white | #FCF6EA, #FCFAF3 / #FFFFFF | tees, socks, shoe uppers, code windows / bubbles and UI cards |
| Red accent / its shadow | #E35D5B / #B8434A | shoe soles, tags, buttons, heart, errors |
| Pale red, pink | #E9A3A0, #F8CCC8, #F4E0E8, #F29CA0 | secondary UI lines, error rows, drop slots, code tokens |
| Green / dark green / pale green | #5FA77A / #3E8E5E / #CDEBD6 | check badges, toggles, success rows |
| Mint, sage | #8FD0B0, #6FB585, #79C2A8 | icon chips, image placeholders, avatar shirts |
| Yellow, orange | #EDB24F, #F09A5E | swatches, earrings, highlighted code |
| UI greys | #BDB8D6 lines, #6E6A8E / #7D79A0 dark lines, #C9C5DE raised-shadow, #CFCBE0 line numbers | text placeholders inside bubbles |
| Devices | #C9C7DA body, #9F9CB8 / #B7B5CC / #A9A7C0 edges, #DCDAE8 keyboard, #A9A6C2 keys, #3A3570 screen, #524C98 active line, #6E68AA, #E8E6F8, #BDB8F0 code on dark | laptops, monitors |
| Furniture | #C9C5E8 + #A9A4D8 seams, #B9B4DE, #D8D3F0 grid, desk #F6E7D2 top / #E3B98E edge, #FFF4D6 lamp glow | chairs, drawers, boards, desks |
| One-off prop tint | e.g. plum #B2679E (the Support beanbag) | one large prop per card may take its own muted tint; lint will WARN on it |
| Avatars | #FBE3CC background, #F1B9A2 skin, #D9774E ginger hair | small faces inside bubbles |
fill-opacity 0.18).#2E2A5C, always a stroke over a flat fill, round caps and joins.#A29DDA, #7C74C4) at 1.0–1.2.#D9735A panels inside an #EE8A6E hoodie; #79BC9C cuffs on a mint sweater).#B8434A under red, #3E8E5E under green, #C9C5DE under white).Q curve, 1.0) 5–7 px inside a top corner: the "sketchy" hand.ui-sans-serif, system-ui, sans-serif, weight 700–800, 10–16 px, navy or white. At most three words per card ("Fixed it!", "+1", "LIVE", "Aa").face() from scripts/panel-kit.mjs; it is the same face in all three examples. 3/4 view, 36 wide and 46 tall (brow to chin), chin at (232, 166.5) before your transform. Near eye a navy ellipse rx 1.8 ry 2.1 with an upper-lid arc and a lash flick to the outside; far eye smaller (rx 1.5 ry 1.9); arched brows 1.2; a single hook nose on the far side of the face; an open smile filled #9A3E52 with a pink tongue line; blush ellipse 7.6 × 4.2 under the near eye and a small one at the far cheek edge; ear with one inner curve; a gold earring.<g transform="translate(dx dy) rotate(a 232 166)">; tilt 4–8° into the action. Mirror with scale(-1 1) to look left. Never scale the head: the line weight would change.#433D71 masses with 1.25 outline: a back mass drawn before the face and a fringe or cap after it. Add 3–5 highlight strokes #7C74C4 (1.1–1.2) following the hair direction and 1–2 navy inner strokes (0.9–1.0). The examples show a bob with a side fringe, a high bun with a scrunchie, and a curly crop.typeHand() (flat or typing, back of hand), pointHand() + pointCuff() (index extended, others curled, thumb across), gripHand() (a right fist round a handle, back to the viewer, thumb over the top on the business end) and kneeHand() (the far arm of a right-facing seated figure, hand palm-down over a knee). Before placing any of them, decide left or right, palm or back, finger direction, and check the thumb side with the table in references/craft.md; mirror the template with scale(1 -1) when the table says the thumb belongs on the other edge.#4A4488 (folds #7C74C4) behind a #6A63B0 near leg; hems as a single line; a sock or bare ankle 2–3 px; white sneakers with a 3-px red sole (sneaker()), a toes-tucked shoe for kneeling (tuckedShoe()). Shoes always touch the floor band or a footrest, with a contact ellipse under them.ticks()) beside a breakout.rx. Panel: x 110 y 46 w 262 h 266 (55 % of the width, 74 % of the height), fill #8A80EA, navy outline 1.35, identical in every card.scripts/panel-kit.mjs holds every repeated part, lifted from the examples (no dependencies, deterministic). Generate the frame, then hand-draw the figure and props in between. node scripts/panel-kit.mjs demo "$WORK/kit.svg" draws every part on one card so you can see them before using them.
scaffold({ prefix, bg, label, clouds, wall, inside, front }) returns the whole card with the layers in the order above. cloud(x, y, 'big'|'mid'|'small'|'tick') and bush(x, 'big'|'mid'|'small', { mirror }) place the doodles; floorShadow(cx, cy, rx) puts a contact ellipse on the floor.
node scripts/panel-kit.mjs scaffold "$WORK/card.svg" --bg orchid --prefix xx- --label "Card Name"
bubble({ x, y, w, h, tail: 'down'|'left'|'right', at }) draws a white speech bubble (radius 8, 11-px tail) with its corner tick; wrap it in a <g stroke="#2E2A5C" stroke-width="1.25">. raised(x, y, w, h, rx, face, under) and textLine(x, y, len, colour) fill it.face({ skin, blush, blushOpacity, mouth, earring, smile }) and neck(skin) in template coordinates; sneaker(x, y, { mirror }), tuckedShoe(bx, by).hatch(x, y) returns a pair of slashes: <path d="${hatch(186, 214)} ${hatch(214, 196)}" stroke="#2E2A5C" stroke-width="0.9" fill="none" stroke-linecap="round"/>.gripHand() over it, so the curled fingers and thumb overlap the handle; rotate the fist so its fingers follow the forearm, and tilt the handle up to 45° off the thumb axis for wrist bend. To show a lens or screen magnifying what is behind it, redraw that content inside a clipPath of the lens, scaled 1.6 about the lens centre, then a white fill-opacity 0.18 glass and two short white glare strokes; give the rim a light metal #C9C7DA.xf(d, { ox, oy, tx, ty, s, sx, sy }) moves, scales or mirrors path data while keeping stroke widths exact; use it instead of transform="scale()" on anything outlined.#B5AEEA contact ellipse and must sit on y 295–304 in the floor band, or visibly on a footrest.#C9C7DA rim and a magnified view of the card under it made it read at once.examples/support.svg: Support (peach). Cross-legged on a plum beanbag, typing on a laptop on her lap, leaning in; a user's question bubble breaks out left, a "Fixed it!" reply breaks out right, a code window with a bug row and a fixed row hangs on the panel wall. Shows the typing hand, crossed legs, beanbag compression, kicked-off sneakers.examples/design-system.svg: Design System (orchid). Kneeling on one knee, pressing a red button into its dashed slot on a grid board of components (swatches, toggles, slider, avatar chip); a selected component card with handles and a cursor breaks out top-left, an "Aa" type card breaks out right. Shows kneeling legs, a toes-tucked shoe, a two-handed push, raised UI parts.examples/live-coding.svg: Live Coding (sky cyan). Seated at a desk on a swivel chair, pointing at code on a monitor while grinning at the viewer; a mic on a boom arm, a ring light, a mug; a red LIVE tag crosses the top-left corner, a "+1 ♥" chat bubble breaks out left, a code snippet bubble breaks out right. Shows the pointing hand, a mirrored head with glasses, a hoodie with strings, desk drawers.Run commands from this skill's folder. WORK is your own work folder (any path); the card is $WORK/card.svg with id prefix xx-.
references/craft.md.mkdir -p "$WORK" && cp scripts/panel-kit.mjs "$WORK/" && node scripts/panel-kit.mjs scaffold "$WORK/card.svg" --bg peach --prefix xx- --label "Card Name". For anything beyond the empty frame, write a small generator in $WORK that imports ./panel-kit.mjs and calls scaffold({ ..., front }) with your figure.face()), render, and check the silhouette and the lean at 1x before any detail.node scripts/render.mjs "$WORK/card.svg" "$WORK/card.png"node scripts/render.mjs --sheet "$WORK/sheet.png" examples/*.svg "$WORK/card.svg". Ask "same hand, same set?": frame, line weight, how much breaks out, the face.node scripts/render.mjs "$WORK/card.svg" "$WORK/hand.png" --zoom x,y,w,h --scale 8. Do the thumb proof from references/craft.md on a throwaway copy.references/craft.md, fix, and repeat. Expect four or more rounds.node scripts/lint.mjs "$WORK/card.svg" --prefix xx- --palette style.json. Fix every ERROR; each WARN must be a deliberate tint.rx.110, 46, 262 × 266, fill #8A80EA, navy outline 1.35, drawn after the inside props and before the breakouts.#2E2A5C; widths in the listed bands (no stroke over 1.35 except deliberate UI bars).lint.mjs --palette style.json passes; any WARN is a tint you chose on purpose.