Triage design system v0.13.1-experiment
Home / Foundations / Colour & tokens

Colour & tokens

The palette, its contrast record, the ink layer, and the literals a re-theme must catch.
Two themes, one token file. tokens.json now carries a dark value for every colour primitive (and the data-viz series); tokens.css emits a prefers-color-scheme: dark block plus [data-theme=dark] override, and the core stylesheets consume semantic aliases only — so the whole system flips without a second stylesheet. Dark mode raises surfaces (luminance hierarchy) instead of relying on shadows. Toggle the theme in the topbar to see it live.

Surfaces · live var() values

swatches render the live custom property, not a copy
--bg
#fafafa
Page background (theme-color matches)
--card
#ffffff
Cards, sidebar, inputs, bubbles
--card2
#f5f5f5
Inline code chips, progress track, context strip
--line
#e5e5e5
The single border colour (cards, rows, tables)
--line2
#d4d4d4
Stronger borders: kbd, off-dots, dashed panels
--hover
#f7f7f7
Hover surface
--active
#f2f2f2
Active / selected surface

Text · live var() values

swatches render the live custom property, not a copy
--fg
#000000
Primary text (pure black by design)
--dim
#666666
Secondary text, labels, meta
--fg-soft
#3f3f46
Soft ink for chips/kbd/menu text
--placeholder
#767676
Input placeholder text (4.5:1 on card)
--acc-ink
#0057d9
Accent text on the accent tint (matches --interactive)
--on-ink
#ffffff
Text on ink panels
--ink-soft
#c9c9c9
Light-grey text for chips/highlights on ink surfaces

Accent & status · live var() values

swatches render the live custom property, not a copy
--acc
#0057d9
Links, active nav rail, focus, AI accents (saturated blue; >=4.5:1 on the accent tint)
--ok
#04713f
Success text + badge borders (saturated green)
--warn
#9a4f07
Warning text + badge borders (burnished amber)
--err
#c81e2c
Error / danger text + borders (saturated red)

Tints · live var() values

swatches render the live custom property, not a copy
--tint-acc
#dbeafe
Accent tint behind .note (vivid 100-level)
--tint-ok
#dcfce7
Success tint behind .msg.ok
--tint-warn
#fef3c7
Warning tint behind .msg.warn
--tint-err
#fee2e2
Danger tint behind .msg.err / danger hover

Tint borders · live var() values

swatches render the live custom property, not a copy
--acc-line
#67a3ee
Soft accent border for .note (light stroke)
--ok-line
#57bd8a
Soft success border for .msg.ok
--warn-line
#dda648
Soft warning border for .msg.warn
--err-line
#e08686
Soft danger border for .msg.err

Solid surfaces · live var() values

swatches render the live custom property, not a copy
--acc-solid
#0052f0
Solid accent surface for .note.solid (full saturation; white text 6.06:1)
--ok-solid
#008348
Solid success surface (4.84:1 with white)
--warn-solid
#b45309
Solid warning surface (5.02:1 with white)
--err-solid
#e00b1c
Solid danger surface (4.96:1 with white)

Ink panels · live var() values

swatches render the live custom property, not a copy
--panel
#000000
Black stat tiles, brand mark, bulk bar
--banner-ink
#000000
Banner surface (ink variant): solid black in both themes
--banner-paper
#f7f7f7
Banner surface (default): light grey in light, dark grey in dark
--panel-dim
#a3a3a3
Secondary text on ink panels
--codebg
#0a0a0a
Terminal panels, code blocks, toasts
--codefg
#ededed
Terminal text
--ink-hover
#27272a
Ink hover fill
--bar-bg
rgba(250,250,250,0.94)
Translucent bar background
--scrim
rgba(0,0,0,0.35)
Modal/drawer scrim

Logs · live var() values

swatches render the live custom property, not a copy
--term-green
#4ade80
Log success
--term-amber
#fbbf24
Log warning
--term-red
#f87171
Log error
--term-dim
#a3a3a3
Log secondary
--term-time
#8f8f8f
Log timestamps

Focus & data-viz · live var() values

swatches render the live custom property, not a copy
--focus
rgba(0,112,243,0.35)
Input focus ring (3px box-shadow)

Data visualisation · live var() values

swatches render the live custom property, not a copy
--dv-1
#0072B2
Categorical series 1 (blue) — apply in order
--dv-2
#D55E00
Categorical series 2 (vermillion) — apply in order
--dv-3
#009E73
Categorical series 3 (green) — apply in order
--dv-4
#2E86AB
Categorical series 4 (sky) — apply in order
--dv-5
#8C564B
Categorical series 5 (brown) — apply in order
--dv-6
#B0308A
Categorical series 6 (magenta) — apply in order
--dv-7
#4338CA
Categorical series 7 (indigo) — apply in order
--dv-8
#9A3412
Categorical series 8 (rust) — apply in order

Contrast audit WCAG 2.2: 4.5:1 normal text · 3:1 large text / non-text

1/28 pairs below threshold
PairForegroundBackgroundMeasuredRequired
Body text --text-primary on --surface-page#000000#fafafa20.12:14.5:1pass
Body text --text-primary on --surface-card#000000#ffffff21.00:14.5:1pass
Secondary --text-secondary on --surface-page#666666#fafafa5.50:14.5:1pass
Secondary --text-secondary on --surface-card#666666#ffffff5.74:14.5:1pass
Placeholder --text-placeholder on card#767676#ffffff4.54:14.5:1pass
Accent --interactive on --surface-page#0057d9#fafafa5.98:14.5:1pass
Accent --interactive on --surface-card#0057d9#ffffff6.24:14.5:1pass
Focus outline --interactive on card#0057d9#ffffff6.24:13.0:1pass
Control boundary --border-control on card#8f8f8f#ffffff3.23:13.0:1pass
Decorative border --border-default on card#e5e5e5#ffffff1.26:13.0:1fail
OK --status-success on card#04713f#ffffff6.11:14.5:1pass
OK --status-success on tint#04713f#dcfce75.56:14.5:1pass
WARN --status-warning on card#9a4f07#ffffff6.01:14.5:1pass
WARN --status-warning on tint#9a4f07#fef3c75.40:14.5:1pass
ERR --status-danger on card#c81e2c#ffffff5.71:14.5:1pass
ERR --status-danger on tint#c81e2c#fee2e24.67:14.5:1pass
Accent text --interactive on tint#0057d9#dbeafe5.11:14.5:1pass
Solid accent with white text#ffffff#0052f06.06:14.5:1pass
Solid success with white text#ffffff#0083484.84:14.5:1pass
Solid warning with white text#ffffff#b453095.02:14.5:1pass
Solid danger with white text#ffffff#e00b1c4.96:14.5:1pass
Text on ink --text-on-ink on --ink-panel#ffffff#00000021.00:14.5:1pass
Banner text on paper surface#000000#f7f7f719.60:14.5:1pass
Highlight text on ink chip#c9c9c9#27272a8.99:14.5:1pass
Ink secondary --ink-secondary on --ink-panel#a3a3a3#0000008.33:14.5:1pass
Log success on --code-bg#4ade80#0a0a0a11.36:14.5:1pass
Log warning on --code-bg#fbbf24#0a0a0a11.86:14.5:1pass
Log danger on --code-bg#f87171#0a0a0a7.16:14.5:1pass
Contrast status after 0.2. All text pairs pass: the accent darkened to #0068e0 (4.96:1 on --bg), warning text to #a85708 (4.93:1 on its tint), nav labels now use --text-secondary (#666, 5.74:1) and placeholders use --placeholder (#767676, 4.54:1). Control boundaries use --border-control (3.23:1, meets the 3:1 non-text rule); the decorative --line border remains 1.26:1 by design. The translucent --focus ring is always accompanied by the solid accent outline, so the focus indicator meets 3:1. These pairs are now enforced in CI by lint rule TDS011.

Historical hard-coded colours (pack era — all resolved in core 0.2)

a full re-theme must address these — references/design-tokens.md says the same
ValueWhereNote
#000000.btn.primary, .bulkbar border, .brand-mark, .nav-item:hover, .avatar.you, .bubble.user, .basic pinsInk emphasis — intentional, but repeated as a literal
#ffffffcards, buttons, inputs, bubbles, .btn.primary textBase white
#333333.btn.primary:hoverInk hover
#0a0a0a.bulkbar, .logpanel, .toast2, pre.logTerminal black (--codebg token duplicates it)
#3f3f46.nav-item, .chip text, .kbd text, .action-tagZinc-700 text
#444444.think preReasoning text
#999999.nav-label, .composer placeholderMuted micro-text (low contrast, see /audit)
#9d9d9dinput::placeholder, textarea::placeholderPlaceholder (low contrast, see /audit)
#a3a3a3.dot, --panel-dim, .toast2 railNeutral status / disabled
#aaaaaa.bubble.user .metaMeta on ink bubbles
#d4d4d4.logpanel .logrowTerminal secondary text
#8f8f8f.logpanel .monoTerminal timestamps
#4ade80.logpanel .badge.okTerminal green
#f87171.logpanel .badge.errTerminal red
#fbbf24.logpanel .badge.warnTerminal amber
#fbfbfb.tbl th backgroundTable header
#fcfcfc.tbl tr:hover, .auth-panel, .feed-row:hoverSubtle hover
#ececec / #f6f6f6.skeleton shimmerLoading shimmer
#003a8c.note textTint-acc foreground
#27272a.bulkbar .btn:hoverInk hover fill
#0070f3.flow-icon.ai, .cond-row.cond-category .cond-kindAccent literal (token exists)
#d33.cond-remove:hoverOFF-PALETTE red — the only hard red that is not --err
#f0f7ff / #edfbf2 / #fff8ea / #fff1f1patterns + tintsTint literals (tokens exist)
rgba(0,0,0,.10–.28)menu/toast/scrim/drawer shadowsElevation shadow values
rgba(250,250,250,.94).savebar, .topbar translucentBackdrop fills

Ink layer + tint pairings

status colour always travels with text
okwarn erracc solid
Informational note — interactive-subtle background, soft accent border, matching accent text.
Result banner — tint-ok / ok.
Warning banner — tint-warn / warn.
Error banner — tint-err / err.
1,204ink stat tile
7needs reply
03:11 info terminal panels re-colour badges: #4ade80 / #fbbf24 / #f87171

Banner surfaces — paper (default) vs ink

paper is the default from design review; ink, tint and solid remain as variants
Paper (default) — light grey, black border, coloured left chip
Informational note
Success — saved.
Warning — saved, but partly.
Error — folder not found.
Ink variant (`.ink`) — solid black, black border, same chip
Informational note
Success — saved.
Warning — saved, but partly.
Error — folder not found.
Default surface is --surface-banner (paper): #f7f7f7 light, #1e1e1e dark. The .ink variant uses --surface-banner-ink (solid black, both themes). Status colour lives in the var(--bw-edge) (8px) left chip; highlights inside ink/solid banners use light-grey text on a dark chip. Paper/tint keep the normal chip.

Banner styles — tint vs solid

alternates — swap .tint / .solid onto .msg (or .note)
Tint — soft border, matching text
Informational note
Success — saved.
Warning — saved, but partly.
Error — folder not found.
Solid — full-saturation surface, white text
Informational note
Success — saved.
Warning — saved, but partly.
Error — folder not found.
Solid tokens: --interactive-solid, --status-success-solid, --status-warning-solid, --status-danger-solid; text is --text-on-ink (white). Contrast with white: 6.06 / 4.84 / 5.02 / 4.96 — all pass 4.5:1 in both themes (checked by TDS011).
The token alias tier. The W3C DTCG format supports aliases ({color.accent}). To retheme safely, a semantic tier sits over the raw palette (e.g. surface.page → {color.bg}, text.secondary → {color.dim}, status.success → {color.ok}) so components stop reaching for primitives. tokens.json emits both tiers.

Architecture — two tiers, one theme file

  • Primitives (47) hold raw values and are the only thing tokens.css defines: --bg, --acc, --ok… with dark values attached.
  • Semantic aliases (46) are the product API: --surface-*, --text-*, --border-*, --interactive-*, --status-*, --ink-*, --code-*, --log-*, --dv-*. Core consumes aliases only; TDS012 flags primitives in product code.
  • Dark mode is the same file: each primitive carries a com.triage.dark value and tokens.css emits prefers-color-scheme + [data-theme] overrides.
  • Contrast is a gate, not a guideline: TDS011 checks the text/status/tint/solid pairs in both themes on every run.
  • Decorative vs interactive borders: --border-default stays light by design; --control-border exists for the 3:1 control boundary.

Suggestions derived

  • Sequential / diverging ramps: ordered data (heatmaps, scales) still needs a monochromatic ramp — the categorical 8 are for series only (F13 in the audit).
  • Alias adoption in products: the tier exists but only the system core is guaranteed to use it; a codemod from primitive → alias is the cheapest retheme insurance.
  • Strict 1.4.11 mode: if a downstream audit requires 3:1 for every visible boundary, switch decorative borders to --control-border and accept the heavier look.
  • Print and email surfaces: ink panels need the paper rule (already in @media print); if the system grows marketing surfaces, add a dedicated print stylesheet.
Triage Design System v0.13.1-experiment — the central, app-agnostic UI design authority. Source of truth: /tokens/tokens.json. Showcase chrome only: site/.