# Color specification: Example Shop

Template version 1.0, 2026-10-12, from https://auricartisan.com/templates/color-specification/
Licence: CC0 1.0 Universal (public domain). Replace the example with your own product, roles and values.

| Field | Value |
| --- | --- |
| Product | Example Shop web store and order emails |
| Owner | Design systems team, design-systems@example.org |
| Status | Approved |
| Specification version | 3.0, 2026-10-12 |
| Standard | WCAG 2.2: text at 7:1 (Level AAA, 1.4.6), interface parts at 3:1 (1.4.11) |
| Tokens | tokens.css and design.tokens.json, from the starter token system |
| Next review | 2027-04-12 |

## 1. Scope

This specification covers every color in the interface of the web store and the order emails, in the light and the dark theme. It does not cover product photos, brand illustrations or marketing campaigns, which have their own guidelines.

## 2. Color roles

Use a role, never a raw value. Each role points at one step of a color ramp in light, and another in dark.

| Role | Token | Light | Dark | Use it for | Do not use it for |
| --- | --- | --- | --- | --- | --- |
| Page canvas | color-canvas | #F3F5FB | #000000 | The page behind everything, and the gaps between cards. | Behind text: put text on a surface. |
| Surface | color-surface | #FFFFFF | #15161A | The main reading area, panels and inputs. | Text: use color-text. |
| Raised surface | color-surface-raised | #FFFFFF | #28292D | Cards, menus and dialogs that sit above the surface. | The page background. |
| Body text | color-text | #15161A | #FFFFFF | Body text, headings and labels on any surface. | Text on primary or status fills: they have their own text roles. |
| Muted text | color-text-muted | #57585D | #BCBDC4 | Secondary text: captions, hints and timestamps. | Anything a person must read to finish a task. |
| Border | color-border | #85868C | #85868C | Control boundaries and dividers. | Text: it is chosen for interface parts at 3:1, not for text. |
| Primary | color-primary | #4338CA | #ADB8FF | The primary button fill and the selected item in a set. | Large backgrounds behind body text. |
| Primary hover | color-primary-hover | #311EA4 | #CDD5FF | The primary button fill on hover and press. | A second brand color. |
| Text on primary | color-on-primary | #FFFFFF | #000000 | Labels and icons on primary and primary hover. | Text on a surface. |
| Focus ring | color-ring | #4338CA | #ADB8FF | The keyboard focus outline, 2px or wider, offset onto the surface. | Borders: keep focus distinct from them. |
| Success text | color-success-text | #004E20 | #9CEEAD | Text and icons that report success, on the success surface. | The only sign that something worked: add a word. |
| Success surface | color-success-surface | #DFFFE4 | #001D07 | Behind success messages and badges. | Text. |
| Warning text | color-warning-text | #5C3500 | #FFCD9A | Text and icons that warn, on the warning surface. | The only sign of a warning: add a word. |
| Warning surface | color-warning-surface | #FFF3E7 | #231100 | Behind warning messages and badges. | Text. |
| Error text | color-danger-text | #7D0006 | #FFC8C1 | Errors and destructive actions, on the danger surface. | The only sign of an error: add a message. |
| Error surface | color-danger-surface | #FFF2F0 | #320001 | Behind error messages and destructive confirmations. | Text. |
| Information text | color-info-text | #00446B | #B3DDFF | Neutral notices, on the information surface. | Links: they need their own role. |
| Information surface | color-info-surface | #EDF7FF | #00182A | Behind neutral notices. | Text. |

## 3. Allowed pairs

These are the only pairs the product may rely on. Ratios are WCAG 2 contrast ratios, rounded down to two places; a pair passes on the unrounded value.

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

## 4. Pairs to avoid

| Text or part | On | Light | Dark | Why |
| --- | --- | --- | --- | --- |
| color-text | color-primary | 2.28:1 | 1.89:1 | Body text on the primary fill. Use color-on-primary. |
| color-on-primary | color-surface | 1.00:1 | 1.16:1 | The button label color as text on a surface. It almost disappears. |
| color-text-muted | color-primary | 1.11:1 | 1.01:1 | Muted text on the primary fill. |
| color-border | color-surface | 3.62:1 | 4.98:1 | The border color used for text. It is chosen for 3:1, which is enough for a boundary but not for text. |
| color-ring | color-primary | 1.00:1 | 1.00:1 | A focus ring drawn on the primary fill. Offset the ring onto the surface instead. |

## 5. States

- Hover: the primary button fill changes to color-primary-hover; its label stays color-on-primary, which passes on both fills.
- Focus: a 2px outline in color-ring with a 2px offset, so it sits on the surface (7.90:1 in light, 9.53:1 in dark). Never rely on the outline against the primary fill: they share a color.
- Disabled: disabled controls keep color-border and color-text-muted and the disabled attribute. WCAG does not require contrast for inactive controls, but they stay readable here.
- Selected: a selected item uses color-primary and also changes shape or weight, such as a check mark or a bold label.
- Error: a field in error uses color-danger-text for its message and border, and the message says what is wrong.

## 6. Meaning beyond color

- Every success, warning, error and information message has a word and an icon, not only a color (WCAG 1.4.1).
- Links in running text are underlined.
- Charts label their series directly or use the chart palette with patterns; color is never the only way to tell series apart.

## 7. Dark theme

- The theme follows the reader's system setting. A setting on the account page can force light or dark.
- Every allowed pair above is measured in both themes. A new pair is not allowed until it passes in both.

## 8. Changing a color

1. Propose the change with the new value and the before and after ratio of every pair it touches.
2. Measure every allowed pair again in both themes. A contrast matrix makes this quick.
3. Update the tokens and this specification together, raise the specification version, and add a line to the change log.
4. Tell the teams that build with the tokens.

## 9. Change log

| Version | Date | Change |
| --- | --- | --- |
| 3.0 | 2026-10-12 | Text pairs raised to 7:1; status colors given their own surfaces in dark. |
| 2.1 | 2026-04-02 | Focus ring offset onto the surface. |

## 10. Sign-off

| Role | Name | Date |
| --- | --- | --- |
| Design |  |  |
| Engineering |  |  |
| Accessibility review |  |  |
