Colours
Palette
- Red for blood
- Dark red variant
- Tuned red
- Signal red
- Sand
- Orange
- Old gold
- Drip yellow
- Every green
- Yellow
- Chartreuse
- Apple green
- Metal green
- Hysteric blue
- Winning blue
- Sharp blue
- Purple
- Pink
Inks
- White
- Egg
- Light grey
- Slate light
- Darker grey
- Stealth
- Slate dark
- Ink
- Black
- Slate
Palette
- Red for blood
- Dark red variant
- Tuned red
- Signal red
- Sand
- Orange
- Old gold
- Drip yellow
- Every green
- Yellow
- Chartreuse
- Apple green
- Metal green
- Hysteric blue
- Winning blue
- Sharp blue
- Purple
- Pink
Inks
- White
- Egg
- Light grey
- Slate light
- Darker grey
- Stealth
- Slate dark
- Ink
- Black
- Slate
Using the colours
Section titled “Using the colours”Every colour here is a token: --one-<colour> and --one-<colour>-pastel (--one-apple-green, --one-purple-pastel), each written light-dark(light, dark), plus --one-zenith-blue and --one-comfortable-green for the two named pastels. They live in palette.css (DS1/1-root/palette.css), which one.css imports and Sync 1’s root and tokens exports copy, so components and page content share the same palette. light-dark() follows the page’s color-scheme, which one.css sets. palette.css is written from DS1/1-root/palette.ts by vp exec tsx scripts/write-palette-css.ts; never edit them by hand.
Text contrast
Section titled “Text contrast”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:
<ds-avatar initial="AK" color="var(--ds-accent-color)" ink="var(--ds-button-text-color-on-accent)" label="Alex Kim"></ds-avatar>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, Site check and vp run constraints:phone <address> all 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.
Contrast watch
Section titled “Contrast watch”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:
import('./0-face/contrast-watch').then(m => m.startContrastWatch());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:
startContrastWatch({ selectors: [ { key: 'project.feedback', selector: '.project-feedback__question' }, { key: 'account.error', selector: '.error', within: 'account-form' },] });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.
Sync 1’s root modules contrast-watch, constraints and grid copy it, with contrast-selectors.ts, text-contrast.ts and failures.ts, into the product’s 0-face/ folder.