# Starter design tokens

Template version 1.0, 2026-10-12, from https://auricartisan.com/templates/starter-tokens/. Licence: CC0 1.0 Universal (public domain).
Use it for anything, including paid work; no credit needed.

A small, complete token system for a product's colors, spacing, type, radii, shadows and motion, in light and dark. Every text color reaches 7:1 or more against the background it is meant for (WCAG 2.2 AAA, success criterion 1.4.6), and every border and focus ring reaches 3:1 or more (1.4.11).

## Files

- tokens.css: CSS custom properties. Light and dark follow the reader's color scheme through light-dark(). Set data-theme="light" or data-theme="dark" on an element to force one.
- design.tokens.json: the same tokens in the Design Tokens Community Group format, version 2025.10, for Style Dictionary, Tokens Studio and similar tools. Select the light or dark group before you transform.
- tokens-readme.md: this file.

## Three layers

1. Primitives (131): raw values. Seven color ramps (brand, accent, neutral, success, warning, danger, info) in eleven steps, two neutral end points, and spacing, type, radii, shadows and motion.
2. Roles (29): what a value is for, such as color-text or color-surface. Each role points at a primitive, and at a different one in dark mode.
3. Components (17): aliases for parts, such as button-primary-bg. Components point at roles, never at primitives.

Use roles and components in your CSS. Do not use a primitive directly in a component: that is what lets the dark theme work.

## Color roles

| Role | Light | Dark | Use it for |
| --- | --- | --- | --- |
| color-canvas | #F3F5FB | #000000 | The page behind everything, and the gaps between cards. |
| color-surface | #FFFFFF | #15161A | The main reading area, panels and inputs. |
| color-surface-raised | #FFFFFF | #28292D | Cards, menus and dialogs that sit above the surface. |
| color-text | #15161A | #FFFFFF | Body text, headings and labels on any surface. |
| color-text-muted | #57585D | #BCBDC4 | Secondary text: captions, hints and timestamps. |
| color-border | #85868C | #85868C | Control boundaries and dividers. |
| color-primary | #4338CA | #ADB8FF | The primary button fill and the selected item in a set. |
| color-primary-hover | #311EA4 | #CDD5FF | The primary button fill on hover and press. |
| color-on-primary | #FFFFFF | #000000 | Labels and icons on primary and primary hover. |
| color-ring | #4338CA | #ADB8FF | The keyboard focus outline, 2px or wider, offset onto the surface. |
| color-success-text | #004E20 | #9CEEAD | Text and icons that report success, on the success surface. |
| color-success-surface | #DFFFE4 | #001D07 | Behind success messages and badges. |
| color-warning-text | #5C3500 | #FFCD9A | Text and icons that warn, on the warning surface. |
| color-warning-surface | #FFF3E7 | #231100 | Behind warning messages and badges. |
| color-danger-text | #7D0006 | #FFC8C1 | Errors and destructive actions, on the danger surface. |
| color-danger-surface | #FFF2F0 | #320001 | Behind error messages and destructive confirmations. |
| color-info-text | #00446B | #B3DDFF | Neutral notices, on the information surface. |
| color-info-surface | #EDF7FF | #00182A | Behind neutral notices. |

## Pairs the system relies on

Each pair is measured in both themes with the WCAG 2 contrast ratio, rounded down to two places.

| Pair | Tokens | Light | Dark | Minimum |
| --- | --- | --- | --- | --- |
| Body text on the surface | color-text on color-surface | 18.07:1 | 18.07:1 | 7:1 |
| Muted text on the surface | color-text-muted on color-surface | 7.09:1 | 9.65:1 | 7:1 |
| Body text on a raised surface | color-text on color-surface-raised | 18.07:1 | 14.52:1 | 7:1 |
| Muted text on a raised surface | color-text-muted on color-surface-raised | 7.09:1 | 7.75:1 | 7:1 |
| Primary button label | color-on-primary on color-primary | 7.90:1 | 11.07:1 | 7:1 |
| Primary button label on hover | color-on-primary on color-primary-hover | 11.33:1 | 14.55:1 | 7:1 |
| Focus ring on the surface | color-ring on color-surface | 7.90:1 | 9.53:1 | 3:1 |
| Focus ring on a card | color-ring on color-surface-raised | 7.90:1 | 7.66:1 | 3:1 |
| Input border on the surface | color-border on color-surface | 3.62:1 | 4.98:1 | 3:1 |
| Input border on a card | color-border on color-surface-raised | 3.62:1 | 4.00:1 | 3:1 |
| Success message | color-success-text on color-success-surface | 9.26:1 | 12.93:1 | 7:1 |
| Warning message | color-warning-text on color-warning-surface | 9.78:1 | 12.54:1 | 7:1 |
| Error message | color-danger-text on color-danger-surface | 10.24:1 | 12.57:1 | 7:1 |
| Information message | color-info-text on color-info-surface | 9.48:1 | 12.63:1 | 7:1 |

## Rules

- Put text on color-surface, color-surface-raised or its own status surface, not straight on color-canvas.
- color-text-muted is for secondary text only: captions, hints and timestamps.
- color-border is for interface parts. It is chosen for 3:1, not for text.
- Draw the focus ring in color-ring, 2px or wider, with a 2px offset so it sits on the surface. On a primary button it must not sit on the button's fill: the two share a color.
- Status colors never work alone. Give every success, warning, error and information message a word and an icon (WCAG 1.4.1).

## Change the brand color

Open https://auricartisan.com/design-tokens/, choose a new seed color and export again: the roles are chosen again so every pair above still passes. If you edit the primitives by hand instead, measure every pair in the table again before you ship:
https://auricartisan.com/tool/contrast-checker/

## What it does not do

Tokens give you colors that pass together. They do not make a component accessible: labels, keyboard support, focus order and names still have to be built and tested.
