Colours

LightDark

Palette

  • Spinel
  • Tuned
  • Salmon
  • Apricot
  • Orange
  • Sand
  • Evergreen
  • Yellow
  • Chartreuse
  • Apple
  • Viridian
  • Metal
  • Peacock
  • Hysteric
  • Winning
  • Sharp
  • Lobelia
  • Aconite
  • Pink

Inks

  • Egg
  • Slate
  • Stealth
  • White
  • Ink
  • Black

Scales

50100200300400500600700800900950
Spinel
Tuned
Salmon
Apricot
Orange
Sand
Evergreen
Yellow
Chartreuse
Apple
Viridian
Metal
Peacock
Hysteric
Winning
Sharp
Lobelia
Aconite
Pink
Egg
Slate
Stealth

Every colour has a one-word name and a scale from 50, nearest white, to 950, nearest black, as Tailwind’s do: --ds-palette-sharp-50 to --ds-palette-sharp-950. A step is one fixed colour in both themes. Each family keeps one trademark colour of Design system 1 at its own step, marked in the scales above: --ds-palette-sharp is Sharp at 500, --ds-palette-hysteric is Hysteric at 300. That core token and its pastel, --ds-palette-sharp-pastel, follow the theme with light-dark(). The other trademark colours stand exactly on their family’s steps: Tuned red, Signal red, Red for blood and Dark red variant are --ds-palette-tuned-400 to --ds-palette-tuned-700, Drip yellow is --ds-palette-orange-300, Old gold --ds-palette-sand-500, Purple --ds-palette-pink-500 and Zenith blue --ds-palette-sharp-200.

Spinel, Salmon, Apricot, Viridian, Peacock, Lobelia and Aconite come from Sanzo Wada’s A Dictionary of Color Combinations, each scale drawn through one of his colours. They fill the hues between the trademark colours and are quieter than them.

A card or an Ask card takes a family’s name as its tone (tone="hysteric"). The tokens live in palette.css (ds1/1-root/palette.css), which one.css imports and Sync 1’s root and tokens exports copy. palette.css is written from ds1/1-root/palette.ts by vp exec tsx scripts/write-palette-css.ts; never edit either by hand. A family is its trademark hex pinned at a step; the generator draws the rest in OKLCH, and a new family is one line in palette.ts.

Every palette token starts with --ds-palette-; --one- belongs to the design names a library sets. Older family names, such as the tone apple-green or --ds-palette-sharp-blue, still resolve to their exact old values, for saved pages. Move a product off old names with vp exec tsx "<Design system 1>/scripts/rename-tokens.ts" <folders>; --check lists what is left.

A palette colour is not automatically a readable text colour. Every visible text label, including muted text, placeholders and avatar initials, must keep 4.5:1 contrast against its actual surface. Pair a coloured fill with an explicit readable ink, and check both themes and interactive states. For example:

<code><span class="line"><span style="color:var(--docs-code-ink)"><</span><span style="color:var(--docs-code-tag)">ds-avatar</span><span style="color:var(--docs-code-keyword)"> initial</span><span style="color:var(--docs-code-ink)">=</span><span style="color:var(--docs-code-string)">"AK"</span><span style="color:var(--docs-code-keyword)"> color</span><span style="color:var(--docs-code-ink)">=</span><span style="color:var(--docs-code-string)">"var(--ds-accent-color)"</span></span><span class="line"><span style="color:var(--docs-code-keyword)">  ink</span><span style="color:var(--docs-code-ink)">=</span><span style="color:var(--docs-code-string)">"var(--ds-button-text-color-on-accent)"</span><span style="color:var(--docs-code-keyword)"> label</span><span style="color:var(--docs-code-ink)">=</span><span style="color:var(--docs-code-string)">"Alex Kim"</span><span style="color:var(--docs-code-ink)">></</span><span style="color:var(--docs-code-tag)">ds-avatar</span><span style="color:var(--docs-code-ink)">></span></span></code>

The color.text-contrast constraint measures resolved colours inside components, not just library token pairs. It composites transparent colours and opacity through slots and open shadow roots. Image and gradient backgrounds or filters that it cannot measure are reported for visual review. Hidden text and inactive controls are excluded; aria-hidden alone does not exempt visible writing.

The page panel and Site check use this same rule. Recheck after opening menus or dialogs and in each supported theme: a pass covers only the rendered state. Closed shadow roots, canvas text, text in images and overlapping unrelated layers require visual review. The rule uses the WCAG contrast calculation; DS1 keeps the 4.5:1 minimum for large text too.

The constraint panel checks only when someone opens it. In a product, contrast-watch.ts runs the same measurement on the theme the person is actually using and reports what fails, so a colour that is unreadable in dark mode becomes an issue in System without anyone looking for it.

Start it once the page has loaded and gone idle, with a lazy import, so it costs the first paint nothing:

<code><span class="line"><span style="color:var(--docs-code-keyword)">import</span><span style="color:var(--docs-code-ink)">(</span><span style="color:var(--docs-code-string)">'./1-root/constraints/contrast-watch'</span><span style="color:var(--docs-code-ink)">).</span><span style="color:var(--docs-code-tag)">then</span><span style="color:var(--docs-code-ink)">(m </span><span style="color:var(--docs-code-keyword)">=></span><span style="color:var(--docs-code-ink)"> m.</span><span style="color:var(--docs-code-tag)">startContrastWatch</span><span style="color:var(--docs-code-ink)">());</span></span></code>

It measures when the browser is idle after it starts, again after every theme change, and when the path changes or the page has been quiet for two seconds after a burst of changes. It runs at most once every ten seconds and once per theme and path, never while the page is hidden, and leaves pages with more than 4,000 pieces of text alone. Each run reports at most ten findings.

Each finding goes through reportFailure as contrast.<theme>.element.<authored-key>, for example contrast.dark.element.ds1.tag.label. The message contains the measured colours, ratio, authored selector and path, but no text, DOM IDs or unregistered class names. The query and fragment never enter a report.

Products can register known surfaces in source:

<code><span class="line"><span style="color:var(--docs-code-tag)">startContrastWatch</span><span style="color:var(--docs-code-ink)">({ selectors: [</span></span><span class="line"><span style="color:var(--docs-code-ink)">  { key: </span><span style="color:var(--docs-code-string)">'project.feedback'</span><span style="color:var(--docs-code-ink)">, selector: </span><span style="color:var(--docs-code-string)">'.project-feedback__question'</span><span style="color:var(--docs-code-ink)"> },</span></span><span class="line"><span style="color:var(--docs-code-ink)">  { key: </span><span style="color:var(--docs-code-string)">'account.error'</span><span style="color:var(--docs-code-ink)">, selector: </span><span style="color:var(--docs-code-string)">'.error'</span><span style="color:var(--docs-code-ink)">, within: </span><span style="color:var(--docs-code-string)">'account-form'</span><span style="color:var(--docs-code-ink)"> },</span></span><span class="line"><span style="color:var(--docs-code-ink)">] });</span></span></code>

Keys and selectors must be authored constants, never derived from DOM attributes, server data, user text or routes. Keys use lowercase letters, digits, dots and hyphens, start with a letter, and are at most 40 characters. The registry accepts at most 128 valid unique entries, including DS1 defaults for input values/errors, tags, buttons and badges. The nearest matching element wins; source order breaks ties, and within follows painted ancestors across shadow roots. Matching is bounded to 32 ancestors. Product entries precede defaults.

Unregistered elements deliberately remain coarse: contrast.<theme>.unregistered.<native-tag>, using a finite native-tag vocabulary and custom for unknown tags. Classes and IDs never alter this fallback. Add a source-authored registry entry when distinct unregistered surfaces need separate issues; do not guess authorship from class spelling. Existing aggregate issues keep their original history and require separate review.

One identity is reported once per session and theme, independent of path, colours, content and build hashes. The 200-key session cache and per-run limit remain bounded. All failure codes fit the Feedback loop’s 80-character contract. A development build also warns locally with the element.

It lives with the other checks in 1-root/constraints/. Sync 1’s root modules contrast-watch, constraints and grid copy it, with contrast-selectors.ts and text-contrast.ts, into the product’s 1-root/constraints/ folder, and failures.ts into 1-root/.