Foundations

Color

Coffee brown and olive green on warm neutrals, in light and dark. Every color is defined once in tokens.json and reaches the screen through three layers.

Why we chose this

Brown is the brand and the one main action. Olive supports it. Warm neutrals carry the page. Every color has a role name (surface-primary-default), not a value, and both themes use the same names, so a component never needs to know which theme is on.

Use it for

  • The main action of a view: surface-primary-default with static-white text
  • Supporting actions and calm links: the secondary olive tokens
  • Success, warning, error and info: only to report a status

Don't

  • Type a hex value or a primitive like brown-500 in a component. Use the role token.
  • Put two primary buttons in one view.
  • Let color be the only signal. Add text or an icon.

Which color for which job

Pick by the job, never by the look. These are the tokens you will use most. The swatches follow the active theme, so flip the theme in the header to see both.

TokenUse it for
surface-pageThe page ground. Everything else sits on it.
surface-componentCards, menus, dialogs and fields, one step above the page.
surface-tintA warm layer to group a section or a panel without a shadow.
surface-primary-defaultThe one main action of a view. Its label is static-white.
surface-secondary-defaultSupporting actions next to a primary one.
text-base-defaultBody text and headings.
text-base-neutralSecondary text: hints, captions, meta.
text-primary-defaultBrand accents and brand-colored text.
text-secondary-defaultCalm links inside paragraphs.
border-lightDividers and the default border of cards and fields.
border-strongBorders that must be seen: inputs, outlined buttons.
focus-primaryThe keyboard focus ring. Always visible, never removed.
surface-error-defaultErrors: fill. Pair with text-state-error for messages.
text-state-successSuccess messages. Warning and info have their own -state- tokens.

All 94 semantic tokens, with their light and dark values, are in the token reference.

The three-layer structure

Colors reach the screen in three steps. Think of a paint shop. The cans of paint are the raw colors. The labels on them say what each can is for: walls, trim, doors. The rooms are what people actually see. A room always asks for "wall paint", never for "can number 500". So when you repaint, you change what is inside the wall can once, and every wall follows.

See it work: one role, two themes

The role surface-secondary-default means "the fill of a supporting button". In light it points to one green, in dark to a slightly lighter one. The button only knows the role, so it switches by itself.

The three layers

1 · Raw colors (primitives)2 · Roles (semantic tokens)3 · Components
In plain wordsThe paint cans. Every shade we own, named by hue and darkness.The labels on the cans: what each color is for.What people see, built from labels, never from cans.
Examplebrown-500 is #a75e2asurface-primary-default.cm-btn--primary
Changes with the theme?No. A raw color is always the same.Yes. Each role picks a raw color for light and another for dark.No. Components never know which theme is on.
Who edits itDesign system owners, rarely.Design system owners, when a role is missing or a value changes.Anyone building screens.
Where it livestokens.json, primitivestokens.json, semanticcomponents.css and your own code
Use it in your code?NeverAlwaysYou use the components themselves

What do I change when…

You want toChange this layerWhat happens
Fix a color that looks wrong in dark mode2 · Roles: point the role to another raw color for darkEvery component using that role updates. No component code changes.
Rebrand to a different brown1 · Raw colors: change the brown stepsEvery role that points to brown follows, and so does every component.
Make one button look different3 · Component: use another role, for example the secondary oneOnly that component changes.
Use "a slightly lighter brown" for something new2 · Roles: add a role that says what it is forThe new need gets a name, so it can be reused and works in both themes.

Follow one token through the layers

Pick any role to see which raw color it uses in each theme, and how a component writes it.

Rules

RuleReason
Components use semantic tokens only. Never a primitive, never a hex.Otherwise theming and rebrands break.
Pick by role, not by look. If "a lighter brown" is what you want, the role is missing: add a semantic token.Keeps the system small and meaningful.
Only the semantic layer may reference primitives.One place to change what a role means.
Every semantic token needs a light and a dark value.No screen should be left with a color from the other theme.

Today the component layer consumes semantic tokens directly. If we later need per-component overrides (for example button-primary-bg), they would be added here as a thin layer that points to semantic tokens.

The palette

Why

Two brand hues keep the identity simple. Coffee brown is the primary: main actions, brand accents, warm backgrounds. Olive green is the secondary: supporting actions, links and quiet elements. Greys, red, yellow, green and blue exist for text, borders and status messages (see Status colors) so the brand hues are never overloaded.

Primary · Brown

Secondary · Moss (olive green)

Olive has the same 12 steps as brown, so a future role (a hover tint, a dark surface, a divider) never has to borrow a color from another hue.

Step numbers are not equal across ramps. moss-500 is about as dark as brown-600. Choose by role, never by matching step numbers.

Supporting ramps

Light and dark

Why

The same token names exist in both themes. Only their values change. Components never know which theme is active, so dark mode needs no component code. Dark is a designed theme, not an inversion: surfaces go to near-black, brand colors get lighter so they keep their contrast, and warm tints become deep browns.

Same components, two themes

How the themes differ

Switching

<html data-theme="dark">           <!-- or "light" (default) -->

// follow the system setting
const dark = matchMedia("(prefers-color-scheme: dark)").matches;
document.documentElement.dataset.theme = dark ? "dark" : "light";

You can also set data-theme on any wrapper to preview one theme inside another, as the panels above do.

Interactive states

Primary and secondary actions share one set of states. Each has a -default, -hover, -pressed, -focused and -disabled token.

Why

Hover and pressed get progressively darker (lighter in dark mode) to feel physical. Do not use the *-focused fills for keyboard focus: keep the default fill and show focus with the focus-primary ring, which is visible on every surface.

Status colors

Alerts, form controls and messages use four status colors: red for error, yellow for warning, green for success and blue for information. They were chosen to sit next to coffee brown and olive green without being mistaken for them.

Why these hues

Our two brand hues are warm: brown sits at about 53° and olive at 130°. A standard orange "warning" (about 50°) and a standard green "success" (about 145°) landed almost on top of them, so a warning looked like the primary brand color and success looked like the secondary button. We moved each status hue to its own space on the wheel: red 22° (crimson, away from brown), yellow 85° (golden, between brown and olive), green 162° (emerald, cooler than olive) and blue 243° (the only cool hue, unchanged). Each step keeps the same contrast as before, so nothing needed re-auditing.

Alerts

Form controls

StatusSurfaceTextIconBorder
Errorsurface-error-inverttext-state-erroricon-errorborder-error-default
Warningsurface-warning-inverttext-state-warningicon-warningborder-warning
Successsurface-success-inverttext-state-successicon-successborder-success
Informationsurface-information-inverttext-state-informationicon-informationborder-information

Never use the brand brown or olive to mean a status. A solid status fill (surface-*-default) takes white text, except warning, which takes text-on-warning (dark).

Contrast

Text must reach 4.5:1 (WCAG AA) against the surface it sits on. Ratios below are computed live from the token values.

Do

Pair text with its listed surface: text-base-default on surface-page, text-on-warning on surface-warning-default.

.notice {
  background: var(--surface-warning-default);
  color: var(--text-on-warning);
}
Don't

Put white text on yellow or light blue fills, or use text-primary-default for body copy. The usage line of each token says where it is safe.

.notice {
  background: var(--surface-warning-default);
  color: var(--static-white);
}

Accessibility

Color is only one way of saying something. These are the guarantees built into the tokens, so teams don't have to re-check them.

Rating tags

The contrast table uses these tags:

AAA · 7:1AA · 4.5:1Large text / UI · 3:1Fails

Never color alone

Do
Payment failedCheck your card number and try again.

Icon, bold word and message. Still clear in greyscale.

<p class="error" role="alert">
  <svg aria-hidden="true">…</svg>
  <b>Payment failed.</b>
  Check your card number and try again.
</p>

.error { color: var(--text-state-error); }
Don't

Payment

Red text alone. Someone who can't tell red from brown, or a screen reader, gets no message.

<p style="color: red">Payment</p>

Focus ring

Press Tab to move through these. The ring is the same on every control.

A text link

Color-blindness simulator

Switch the view and check that the four statuses and the two brand colors can still be told apart. This is an approximation.

Checklist before shipping a screen

Semantic token reference

Every role, its CSS variable and what it is for. Filter by category or search.

Each swatch shows the light value on the left and the dark value on the right. Click a name to copy it.

Naming and use

PatternExampleMeaning
<ramp>-<step>brown-500Primitive. Higher number is darker.
<property>-<role>-<state>surface-primary-hoverSemantic. Property (surface, text, icon, border), role, then state.
.card { background: var(--surface-component); color: var(--text-base-default);
        border: 1px solid var(--border-light); }
.card:hover { background: var(--surface-tint); }
Do

background: var(--surface-primary-default)

.cta {
  background: var(--surface-primary-default);
  color: var(--static-white);
}
.card {
  background: var(--surface-component);
  border: 1px solid var(--border-light);
}
Don't

background: #a75e2a or var(--brown-500) in a component.

.cta {
  background: #a75e2a;
  color: #fff;
}
.card {
  background: var(--white-100);
  border: 1px solid var(--grey-200);
}