Template · Palette and design system

Color specification Template

One document that says what every color in a product is for, which pairs it may be used in and why, and how to change it safely. It comes filled in for a made-up shop: 18 roles in light and dark, 14 allowed pairs measured in both themes, the pairs to avoid, states and rules.

Version
1.0
Updated
2026-10-12
Standard
WCAG 2.2
Roles
18
Allowed pairs
14
Formats
Markdown, CSV
Licence
CC0 1.0

Download

The files

Plain text files you can open anywhere.

Markdown

The specification

color-specification.md

Ten sections, from scope and roles to allowed pairs, states, the change process and sign-off, filled in for Example Shop. Replace the example with your own.

Format
Markdown text (.md)
Size
7,852 bytes
Contents
115 lines

Preview: the first 22 lines

# 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, [email protected] |
| 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.
Download the file

CSV

The roles

color-roles.csv

One row for each color role: its token, its light and dark values and the ramp steps they come from, and what it is and is not for.

Format
Comma-separated values (RFC 4180)
Size
2,948 bytes
Contents
8 columns, 18 rows

Preview: the header and the first 3 rows

Role,Token,Light,Light primitive,Dark,Dark primitive,Use it for,Do not use it for
Page canvas,color-canvas,#F3F5FB,color-neutral-50,#000000,color-neutral-1000,"The page behind everything, and the gaps between cards.",Behind text: put text on a surface.
Surface,color-surface,#FFFFFF,color-neutral-0,#15161A,color-neutral-950,"The main reading area, panels and inputs.",Text: use color-text.
Raised surface,color-surface-raised,#FFFFFF,color-neutral-0,#28292D,color-neutral-900,"Cards, menus and dialogs that sit above the surface.",The page background.

The columns, in order

  • Role
  • Token
  • Light
  • Light primitive
  • Dark
  • Dark primitive
  • Use it for
  • Do not use it for

CSV

The allowed pairs

color-pairs.csv

Every allowed pair in both themes, with both colors, the ratio, the minimum it must reach and the result. Sort and filter it in a spreadsheet.

Format
Comma-separated values (RFC 4180)
Size
2,749 bytes
Contents
9 columns, 28 rows

Preview: the header and the first 4 rows

Pair,Foreground token,Background token,Theme,Foreground,Background,Contrast ratio,Minimum,Result
Body text on the surface,color-text,color-surface,Light,#15161A,#FFFFFF,18.07:1,7:1,Pass
Body text on the surface,color-text,color-surface,Dark,#FFFFFF,#15161A,18.07:1,7:1,Pass
Muted text on the surface,color-text-muted,color-surface,Light,#57585D,#FFFFFF,7.09:1,7:1,Pass
Muted text on the surface,color-text-muted,color-surface,Dark,#BCBDC4,#15161A,9.65:1,7:1,Pass

The columns, in order

  • Pair
  • Foreground token
  • Background token
  • Theme
  • Foreground
  • Background
  • Contrast ratio
  • Minimum
  • Result

Licence: CC0 1.0 Universal, a public domain dedication. Copy, change and use these files for anything, including paid work, without asking or giving credit. The files are plain ASCII text in English, so they open the same everywhere.

What goes in it

What the specification records

A palette is a set of promises: these colors, in these pairs, for these jobs. The specification writes the promises down where designers and engineers can check them.

  1. Who owns it. The product, the owner, the version, the standard it meets and the date of the next review.
  2. The roles. Each color by its job, such as body text or error surface, with its token, its light and dark values, and what it must not be used for.
  3. The allowed pairs. The only pairs the product may rely on, measured in both themes against the minimum each needs.
  4. The pairs to avoid. Combinations people reach for that fail, with the ratio and the reason, so nobody has to find out the hard way.
  5. States. Hover, focus, disabled, selected and error: which roles each uses and how focus stays visible.
  6. Meaning beyond color. The words, icons, underlines and patterns that carry meaning, so color is never the only cue.
  7. Changing a color. The steps for a change, a change log and the sign-off, so the palette stays measured after it ships.

Column by column

Columns of the roles

Columns of the roles (table)
ColumnWhat to write
RoleThe role's name in plain words, such as Body text.
TokenThe token that carries it, such as color-text.
LightIts hex value in the light theme.
Light primitiveThe ramp step it points at in light, such as color-neutral-950.
DarkIts hex value in the dark theme.
Dark primitiveThe ramp step it points at in dark.
Use it forWhat the role is for.
Do not use it forThe tempting misuse, named so it does not happen.

Column by column

Columns of the allowed pairs

Columns of the allowed pairs (table)
ColumnWhat to write
PairWhat the pair is, such as Primary button label.
Foreground tokenThe role of the text or part.
Background tokenThe role it sits on.
ThemeLight or Dark: every pair has one row for each.
ForegroundThe text or part's hex value in that theme.
BackgroundThe background's hex value in that theme.
Contrast ratioThe WCAG 2 ratio, rounded down to two places.
MinimumWhat the pair must reach: 7:1 for text in this example, 3:1 for borders and focus rings.
ResultPass or Fail, decided on the unrounded ratio.

Example

The example's roles in both themes

Each role with the token that carries it and its value in light and dark. The specification adds what each is for and the pairs it may be used in.

The example's roles in both themes (table)
RoleTokenLightDark
Page canvascolor-canvas #F3F5FB #000000
Surfacecolor-surface #FFFFFF #15161A
Raised surfacecolor-surface-raised #FFFFFF #28292D
Body textcolor-text #15161A #FFFFFF
Muted textcolor-text-muted #57585D #BCBDC4
Bordercolor-border #85868C #85868C
Primarycolor-primary #4338CA #ADB8FF
Primary hovercolor-primary-hover #311EA4 #CDD5FF
Text on primarycolor-on-primary #FFFFFF #000000
Focus ringcolor-ring #4338CA #ADB8FF
Success textcolor-success-text #004E20 #9CEEAD
Success surfacecolor-success-surface #DFFFE4 #001D07
Warning textcolor-warning-text #5C3500 #FFCD9A
Warning surfacecolor-warning-surface #FFF3E7 #231100
Error textcolor-danger-text #7D0006 #FFC8C1
Error surfacecolor-danger-surface #FFF2F0 #320001
Information textcolor-info-text #00446B #B3DDFF
Information surfacecolor-info-surface #EDF7FF #00182A

A swatch shows the color; the hex value beside it is the value to use.

How to use it

Write your own

  1. Name the jobs first. List what color does in the product, such as body text, borders and errors, before choosing any values.
  2. Give each job a token. Point each role at a ramp step in light and in dark. The starter token system is a ready-made set to begin from. Use the starter token system
  3. Measure the pairs. Measure every pair the product will rely on, in both themes, and keep only those that pass. Use the contrast matrix template
  4. Write the rules down. Fill in the states, the meaning beyond color and the pairs to avoid, then get the sign-off.
  5. Keep it current. Change the tokens and the specification together, and measure again every time.

Know its limits

Passing pairs are not the whole job

The example aims for 7:1 for text, Level AAA. Level AA asks for 4.5:1, or 3:1 for large text; choose your target and write it in the specification.

A ratio cannot tell you that meaning survives without color, that thin text is readable, or that focus is easy to see. The sections on states and meaning beyond color are there for that.

Next

Related templates and tools

Sources

Where this comes from

Written by Auric Artisan. Not yet reviewed by an independent accessibility specialist.

Suggest a change to the template