← back

Color in four layersSettle the scale once

The color decisions behind a design system, and what each one prevents.

I worked with a team that had three brand colors: brand, brand-light and brand-lighter. Then someone needed something a bit lighter than light. There was nowhere to put it, so they picked a value by eye, and the palette started to drift.

The four layers (raw value, primitive, semantic token and component) are standard. What matters is the decisions inside them, made once so nobody remakes them on every screen. These are the five I'd make again.

Level – 1Raw value#363636
Level – 2Primitiveprimary-800
Level – 3Semanticprimary
Level – 4Component<Button>
Full scales

Build every scale in full before you need it.

Each color gets eleven steps from the start, before most of them have a use. It's preparing for what comes later: a new product, a client's brand, a state nobody planned. When someone needs lighter than light, primary-200 already exists, so nobody invents a shade.

Two neutrals

Use two neutrals, not one.

Neutral is for surfaces and the text you read on them. Control is for the lines and states around them: borders, dividers, focus rings and disabled controls. With one gray, everything comes from the same ramp: a disabled button can land on the same shade as the card behind it and seem to vanish, and a border can match its surface and stop separating anything. With two, a control always stands apart from the surface it sits on, so people can tell what they can use.

Surfaces

Define every surface, even when two look the same.

Canvas, page, card, section and modal are different roles, even when some share a color today. A card can match the canvas and still lift off it with a shadow, and a modal sits higher, with a stronger one. Naming each role early means it can change later without hunting down every place it appears.

Roles

Name colors by what they do.

Components ask for a role, like primary, destructive or error, never a hex. Roles also keep meanings apart. Destructive is an action: a button that deletes. Error is a state: a message or a badge. Naming roles this way gives the team a shared design language to build on.

Rebrand

Rebrand by changing one token.

Every button, link and active state asks for primary, so changing it once moves all of them. That's how Afi sells one simulator to many banks: when a bank buys SAREVI, its brand goes into the design system, not into every screen.

Rules for the AI

Write the rules where the AI reads them.

Today the system lives in Claude Design, and the team generates screens from it. Its README holds the decisions above, so the AI makes them the same way a designer would. I learned how to write those rules in Creating a design.md.