Color

Ink and paper with greys as ink at alphas, and colour only for status.

Rules

  1. color-roles-only MUST Read a role such as text-text-2, bg-paper or border-line-faint; never write a hex, an rgb() or a dark: variant. Because the dark theme swaps every role's value, and a typed colour or a dark: pair stays behind.
    • Correct: <p className="text-text-2">
    • Wrong: <p className="text-[#6c6c6c] dark:text-white">
  2. color-greys-are-ink MUST Make every grey from ink at one of its alphas (--ink-80 to --ink-03) through a role; there is no separate grey ramp. Because a grey that is ink at an alpha sits between the text and the page on paper, on the shell and in the dark theme alike.
    • Correct: bg-hover text-text-2
    • Wrong: bg-gray-100 text-gray-500
  3. color-status-only NEVER Use green, amber or coral for anything but status: not a brand accent, a chart series, a link or a decoration. Because colour means something went right or wrong, so a coral heading reads as an error and a green chip as a pass.
    • Correct: <h2 className="type-heading">New agents</h2>
    • Wrong: <h2 className="text-fail-text">New agents</h2>
  4. color-reading-text NEVER Set a sentence, a value or a hint in text-text-3; it is 3.3:1, for placeholders and icons beside a label. Because ink at 45% falls under the 4.5:1 a person needs to read, and text-text-2 at 5.5:1 is the floor.
    • Correct: <p className="type-caption text-text-2">Runs older than 30 days are deleted.</p>
    • Wrong: <p className="type-caption text-text-3">Runs older than 30 days are deleted.</p>
  5. color-status-word MUST Pair a status colour with its word, such as Failed or Passed, never colour alone. Because green and coral alone fail people with colour blindness, in grayscale and in forced colours.
    • Correct: <span className="type-caption text-fail-text">Failed</span>
    • Wrong: <span className="size-2 bg-fail"/>
  6. color-focus-ink MUST Keep focus in ink; never draw a coral or green ring. Because a coral ring reads as an error, so a focused field would look invalid.
    • Correct: <Button>Run eval</Button> // base.css draws the ink ring
    • Wrong: focus-visible:outline-fail

Tokens

TokenRoleUse forNot forLightDark (blank: same as light)
--pagethe page, a half step darker than paper: a paper overlay still lifts off it and the grey shell reads as the cardapp background, behind cards and overlayspanels#fbfbfa#0c0c0c
--paperpaper: the panel inside a card, a field, an overlaythe card panel, fields, overlaysthe page#ffffff#1f1f1f
--shellthe light grey shell a card's panel sits in, and the footer row on itthe card shell and its footer rowwells#f1f1f0#161616
--fieldthe one grey field: a well for output, a trackcode, output, a track, a disabled controlcontainers#efefef#2a2a2a
--code-surfacewhere a block of code sits: paper, with the panel's hairline when it stands alone, so small dark mono reads on the lightest surfacecode block, JSON view, log viewervar(--paper)
--hoverink at 6%: a row or a plain button under the pointermenu item, row, ghost buttonrgb(5 5 5 / 0.06)rgb(244 244 243 / 0.06)
--hover-rowink at 3.5%: a list row under the pointer, lighter than the selected row's --presseditem, table row, data grid rowrgb(5 5 5 / 0.035)rgb(244 244 243 / 0.04)
--pressedink at 10%: a plain button held, a selected rowghost button active, selected rowrgb(5 5 5 / 0.10)rgb(244 244 243 / 0.10)
--scrimthe dim behind a dialog: ink at 24%dialog, sheetrgb(5 5 5 / 0.24)rgb(0 0 0 / 0.64)
--inksolid ink, a neutral near-black: every text and line is this at an alphachart mark, tooltip#050505#f4f4f3
--ink-80ink at 80%, 11.9:1 on paper: the text colourtext-1, focus ringrgb(5 5 5 / 0.80)#f4f4f3
--ink-60ink at 60%, 5.5:1 on papertext-2rgb(5 5 5 / 0.60)rgb(244 244 243 / 0.60)
--ink-45ink at 45%, 3.3:1 on paper: a mark or a control edge, not texttext-3, line-strongrgb(5 5 5 / 0.45)rgb(244 244 243 / 0.45)
--ink-32ink at 32%: a focused field's line, about a thirdline-focus, text-disabledrgb(5 5 5 / 0.32)rgb(244 244 243 / 0.34)
--ink-15ink at 15%: a field's resting lineline-controlrgb(5 5 5 / 0.15)rgb(244 244 243 / 0.15)
--ink-10ink at 10%: an overlay's ringlinergb(5 5 5 / 0.10)rgb(244 244 243 / 0.10)
--ink-06ink at 6%: the shell's and the panel's edge, a row ruleline-faintrgb(5 5 5 / 0.06)rgb(244 244 243 / 0.06)
--ink-03ink at 3%: the faintest washstriped row, quiet hover on greyrgb(5 5 5 / 0.03)rgb(244 244 243 / 0.03)
--text-1primary text, ink at 80%, 11.9:1 on paperheadings, body, labels, valuesrgb(5 5 5 / 0.80)#f4f4f3
--text-2secondary text, 5.5:1 on paper and 5.3:1 on the page, the floor for readingdescriptions, hints, metaplaceholdersrgb(5 5 5 / 0.60)rgb(244 244 243 / 0.60)
--text-3placeholders and icons beside a label, 3.3:1; never a sentenceplaceholders, icons beside a labelany sentence or valuergb(5 5 5 / 0.45)rgb(244 244 243 / 0.45)
--text-disableda disabled label; no contrast claimdisabled controlrgb(5 5 5 / 0.32)rgb(244 244 243 / 0.34)
--text-inversetext on solid inktooltip, ink glass label#ffffff#050505
--okdone: a status markstatus mark, progress done#2c9a59#3fbf75
--ok-textthe done word, 5.7:1 on paper, 5.0:1 on its tintstatus word, success message#1a7640#6fd69a
--ok-tintthe done groundsuccess badge, success alert#e6f4ea#13261a
--warna warning markstatus mark#d98a0b#f0a531
--warn-textthe warning word, 5.9:1 on paper, 5.2:1 on its tintstatus word, warning message#8a5a00#f5c065
--warn-tintthe warning groundwarning badge, warning alert#fbf0d9#2a2010
--failcoral: a failure mark and the coral glass's topfailure mark, invalid line, destructive glassbrand, focus#e35e49#ec6f5a
--fail-textthe failure word, 5.9:1 on paper, 5.0:1 on its tinterror message, status word#b23c29#f2917f
--fail-tintthe failure grounderror badge, error alert#fbe9e5#2c1714

Contrast

The table on the human page.

Decision table

You needUse
Behind cards and overlays--page, a step darker than paper, so paper lifts without a shadow
Body text, labels, values--text-1
Description, hint, meta--text-2
Placeholder--text-3
Row or plain button under the pointer--hover
A failure word--fail-text

Reject list

  • No brand accent, no gradient, no colour for decoration.
  • No grey that is not ink at an alpha.
  • Elevation: No shadows: depth is drawn inside the shape, and overlays lift with a ring.
  • Borders and lines: One hairline weight, from the faint card edge to the field line that darkens on focus.