Skip to content

Latest commit

 

History

History
188 lines (145 loc) · 14.7 KB

DESIGN.md

File metadata and controls

188 lines (145 loc) · 14.7 KB

name: Image Lab description: A bright, friendly AI image playground where a drawing canvas is the toy. colors: paper: "#fbfdff" page: "#f0f4f9" ink: "#1e2233" ink-soft: "#565d72" line: "#d7dde7" coral: "#ff5a36" coral-soft: "#ffe3d9" highlighter: "#ffd93d" highlighter-soft: "#fff6d6" teal: "#149c8f" teal-soft: "#dcf5f2" typography: display: fontFamily: "Caveat, ui-rounded, cursive" fontSize: "clamp(1.6rem, 3vw, 2.4rem)" fontWeight: 700 lineHeight: 1 heading: fontFamily: "Nunito, ui-rounded, system-ui, sans-serif" fontSize: "clamp(1.4rem, 3vw, 2rem)" fontWeight: 800 lineHeight: 1.1 letterSpacing: "-0.02em" body: fontFamily: "Nunito, ui-rounded, system-ui, sans-serif" fontSize: "1rem" fontWeight: 400 lineHeight: 1.6 label: fontFamily: "Nunito, ui-rounded, system-ui, sans-serif" fontSize: "0.85rem" fontWeight: 700 lineHeight: 1.3 rounded: control: "12px" panel: "22px 30px 20px 34px / 30px 20px 34px 22px" pill: "999px" components: button-primary: backgroundColor: "{colors.coral}" textColor: "{colors.paper}" rounded: "{rounded.pill}" padding: "10px 18px" chip-selected: backgroundColor: "{colors.coral-soft}" textColor: "{colors.ink}" rounded: "{rounded.control}" padding: "8px 12px" chip-idle: backgroundColor: "{colors.paper}" textColor: "{colors.ink-soft}" rounded: "{rounded.control}" padding: "8px 12px"

Design System: Image Lab

1. Overview

Creative North Star: "The Bright Playroom"

Image Lab is a toy first and a tool second. The surface is light and airy — a clean, sunlit room where anyone, including a child, feels invited to make a mess and try again. Personality lives in a joyful, deliberate color palette and in responsive, tactile feedback, never in decoration. The reference points are the low-friction playfulness of Excalidraw and tldraw (drawing is the center of gravity; controls stay light and out of the way) crossed with the premium, celebratory friendliness of Duolingo (vivid color and satisfying feedback that read as crafted, not cheap).

The layout is a live diptych: input on the left, output on the right. Generation is realtime-ish — as the user draws or changes style, the preview re-renders as a living mirror, not a result reviewed after the fact. So the canvas and the preview are co-equal panels, side by side, both bright, forming a single pair at the center of gravity; the drawing side sits slightly larger (~55/45) because the user draws more than they inspect, but the preview is never a thumbnail. On narrow screens the two stack (canvas above, preview below) so the "this becomes that" reading survives. The magic moment — a scribble becoming an image live — is the core delight; the side-by-side maximizes it.

The input is composed, and its parts are first-class. A generation is the canvas frame plus a flat style treatment (Soft toy, Clay, Paper cutout, Watercolor…) and an interpretation choice (Keep sketch or Reimagine), plus optional prompt text. Both selectors are prominent, tactile controls on the input side and read as one act with the drawing: changing either re-renders the same scribble. Lighter tools (brush, reset) sit on the canvas itself. Controls dock below and around the pair, never between the canvas and the preview.

Cadence: single-flight, latest-frame. At most one generation is ever in flight. Any input change (stroke, style, interpretation, applied prompt) marks the state dirty and keeps only the newest snapshot — intermediate states are dropped, never queued. When the in-flight generation finishes, the newest snapshot fires if dirty, else it idles. Disabled or stale generations are discarded. The UI must therefore express a continuously-settling preview (in-flight / just-updated states), not a discrete "Generate → wait → done" transaction.

Motion is responsive: hover, press, and the continuously-updating preview get real feedback and transitions, but nothing is choreographed to the point of competing with the user's work. Mistakes are safe; reset and retry are first-class, cheerful, and never punished.

This system explicitly rejects the look of an intimidating pro tool (dense Photoshop-style chrome, jargon, walls of controls), the generic AI-SaaS aesthetic (cliché purple gradients, hero-metric templates, identical card grids, an eyebrow above every section), a marketing-landing framing (people came to make images, not to be sold to), and cheap childish kitsch (Comic Sans, balloons, over-decoration). Friendly is never an excuse for sloppy.

Key Characteristics:

  • Live diptych — canvas (input) and preview (output) side by side, co-equal and both bright.
  • Light, airy, sunlit surface — the input↔output pair is the brightest, most central object.
  • Restrained sketchbook palette — mostly ink on paper, with a coral marker as the one voice and sparing yellow/teal accents; the generated previews carry the color.
  • Rounded, tactile controls that invite touch (casual + younger users).
  • Responsive motion: feedback and transitions, no heavy choreography.
  • No wrong moves — reset and retry are cheerful and first-class.

2. Colors

A restrained sketchbook palette: a cool-white paper base carrying mostly ink, with a single coral "marker" as the one voice and two sparing accents (highlighter yellow, teal). The color the user cares about lives in the generated previews — the UI stays quiet so those pop.

Primary

  • Marker Coral (#ff5a36): The one voice. Primary actions, selected style/interpretation, the canvas→preview arrow, active-state marker underline. Soft tint Coral Wash (#ffe3d9) fills selected chips. Coral is a fill/large-accent color — do not use it for body text (only ~3:1 on paper); large/bold labels only.

Secondary

  • Highlighter Yellow (#ffd93d, soft #fff6d6): Sparing highlight — a marker swipe under a word, a small "new" flag. Never a surface fill.

Tertiary

  • Live Teal (#149c8f, soft #dcf5f2): The live/updating indicator and quiet success moments. Rare by design.

Neutral

  • Paper (#fbfdff): The airy body/background — a clean cool white, deliberately not cream/sand and not clinical pure white.
  • Page (#f0f4f9): Slightly recessed insets (canvas well, page behind panels), distinguished by tone.
  • Ink (#1e2233): Primary text — near-black cool, ~15:1 on paper. No light-gray "elegance".
  • Ink Soft (#565d72): Secondary/helper text, ~6.4:1 on paper.
  • Line (#d7dde7): Hairline borders and sketch-dashed dividers.

Named Rules

The One-Marker Rule. Coral is the single accent voice. If a second saturated color is fighting it for attention on the same screen, the second one is wrong.

The Sparing Joy Rule. Yellow and teal are rewards, not wallpaper — a highlight swipe, a live dot, a success blink. If they're everywhere, they stop meaning anything.

The Previews-Carry-Color Rule. The UI is quiet paper-and-ink on purpose so the generated images are the loudest color on screen.

The Diptych-Is-Brightest Rule. The canvas+preview pair is the lightest, most saturated-with-attention region on screen — the two read as one bright object. Nothing in the surrounding UI out-shouts them, and neither panel out-shouts the other.

3. Typography

Display Font: Caveat (handwritten; ui-rounded, cursive fallback) — wordmark and a few accent labels only (e.g. the "becomes…" arrow label). UI / Body Font: Nunito (ui-rounded, system-ui, sans-serif fallback) — everything else, in weights 400/600/700/800.

Character: A rounded humanist sans (Nunito) does all the real work — friendly, approachable, legible for casual and younger users — with Caveat's handwriting used sparingly for warmth, like a note scribbled in the margin. The pairing sits on a real contrast axis (handwritten script + rounded sans), never two similar sans.

Hierarchy

  • Display / Wordmark (Caveat 700, clamp(1.6rem, 3vw, 2.4rem), line-height 1): The "Image Lab" wordmark and rare handwritten accents only. Never body or labels.
  • Headline (Nunito 800, clamp(1.4rem, 3vw, 2rem), line-height 1.1, letter-spacing -0.02em): Panel and section titles.
  • Title (Nunito 700, ~1.1rem): Control-group headers.
  • Body (Nunito 400, 1rem, line-height 1.6, max 65–75ch): Instructions, descriptions, helper prose.
  • Label (Nunito 700, ~0.85rem): Control labels and pills. Sentence case, not tracked uppercase.

Named Rules

The Margin-Note Rule. Caveat is a garnish — wordmark and the odd hand-drawn label. Everything you actually read is Nunito. Handwriting on body text or on more than a couple of accents reads as kitsch, not craft.

The No-Eyebrow Rule. No tiny tracked-uppercase kickers above sections. Labels are sentence-case and speak plainly. The eyebrow is an AI tell and an anti-reference here.

4. Elevation

Flat, paper-like, and low. Depth comes from the sketchbook language itself — hairline #d7dde7 borders, hand-drawn wobbly panel edges (the asymmetric rounded.panel value), and sketch-dashed dividers — over tonal layering (paper #fbfdff panels sitting on the recessed page #f0f4f9). Shadows are soft, low, and diffuse when present, used to lift an active control or a floating layer, never to build heavy card stacks.

Shadow Vocabulary

  • Soft lift (box-shadow: 0 4px 16px rgb(30 34 51 / 8%)): Gentle ambient shadow on a raised/active control or the panels — barely there, warm and diffuse.
  • Overlay (box-shadow: 0 12px 32px rgb(30 34 51 / 14%)): Deeper still-soft shadow for popovers/dialogs so they read as above the page.

Named Rules

The Paper-First Rule. Depth is drawn, not dropped — wobbly borders and dashed lines carry the sketchbook feel before any shadow does. If a surface needs a hard shadow to separate, the layout is wrong.

The Soft-Light Rule. Shadows are soft, low-contrast, and warm — never the small-blur/dark-drop-shadow that reads as a 2014 app. If it looks harsh, the blur is too small and the opacity too high.

5. Components

Canvas (input panel, left). A custom <canvas> brush surface (no third-party drawing library) inside a paper panel, white drawing well, with a .canvas-invite "Draw something…" overlay that disappears on first stroke and returns on Reset. A tools row below it holds Brush / Eraser toggle buttons and three ink/coral/yellow color swatches (all aria-pressed), plus a Reset button that clears to a blank white canvas — reset is cheerful, never a warning.

Style selector. A role="group" row of .chip buttons for the available visual treatments; the selected chip gets a hand-drawn coral underline SVG (the "marker" motif). Every style remains visible and tappable, with no dropdown.

Interpretation selector. A second compact .chip group chooses between keeping the source sketch faithful and reimagining it more freely. This is an explicit user choice, not an implicit provider mode.

Prompt field. A plain labeled <textarea> ("Prompt (optional)") for extra guidance text; sentence-case label, no slider, no advanced knobs.

Connector. A hand-drawn squiggle-and-arrowhead SVG between the two panels with a Caveat "becomes…" label — the one sanctioned handwriting accent beyond the wordmark.

Preview / output panel (right). A paper panel with a header row (title + .live-pill) reflecting the canonical generation phase: "Live" (idle/ready), "Updating…" (in flight, soft opacity on the current image via .is-settling), "Busy" (rate limited), or "Hiccup" (error). Failures keep the last valid image and never claim a retry that is not running. The freshest result gets a brief teal .just-updated blink. Below the image: a "Made in Nms" meta line and a Download button (disabled until a result exists). The whole region is aria-live="polite" so status changes are announced without a layout jump.

Buttons & tokens. button-primary (coral fill, pill radius) drives the two actions that remain (color-adjacent buttons are plain .tool-btn/.reset-btn); chip-selected / chip-idle drive both style and interpretation chips per the tokens in this file's frontmatter.

6. Do's and Don'ts

Do:

  • Do keep the canvas+preview diptych the center of gravity and the brightest region — side by side, co-equal, controls docked around and below, never between them.
  • Do treat the preview as a live mirror that updates as the user draws or changes style, not a result that arrives once.
  • Do make style + interpretation selectors prominent, tactile input controls on the canvas side — changing either re-renders the same drawing instantly.
  • Do express a continuously-settling preview (in-flight / just-updated), never a discrete "Generate → wait → done" transaction.
  • Do keep the UI to paper + ink + one coral marker, with yellow/teal only as sparing accents — let the generated previews be the loudest color.
  • Do carry depth with the sketchbook language: hairline borders, hand-drawn wobbly panel edges, sketch-dashed dividers; shadows stay soft and rare.
  • Do use Caveat sparingly (wordmark, the odd hand-drawn label); everything readable is Nunito.
  • Do make controls rounded, tactile, and generously sized — easy to hit for casual and younger users.
  • Do give responsive feedback on hover, press, and result-arrival; make reset/retry cheerful and first-class.
  • Do keep body text ≥4.5:1 against the airy background; dark, confident ink over light-gray "elegance".
  • Do use sentence-case labels in one rounded sans, differentiated by weight.

Don't:

  • Don't build an intimidating pro tool — no dense Photoshop-style chrome, jargon, or walls of controls.
  • Don't use the generic AI-SaaS aesthetic: no cliché purple gradients, no hero-metric template, no identical card grids, no eyebrow above every section.
  • Don't frame it as a marketing landing page — users came to make images, not to be sold to.
  • Don't slide into childish kitsch — no Comic Sans, no balloons, no over-decoration. Playful must read as crafted.
  • Don't default the background to cream/sand/beige (the warm-neutral AI tell) or to a dark navy+indigo studio — the target is bright and airy, deliberately not the proof-of-concept palette.
  • Don't spend yellow or teal everywhere — reserve them for highlights and live/success moments.
  • Don't let a second saturated color fight coral for attention, and don't set body text or more than a couple of labels in Caveat — handwriting overused reads as kitsch.
  • Don't use coral (#ff5a36) for body text — it's ~3:1 on paper; fills and large/bold labels only.