Start from roles, not from colours
Most beginners pick colours they like and then find places to use them. That produces a palette with no structure, and every new screen requires a fresh decision. The alternative is to list the jobs an interface needs colour to do, and only then choose values.
| Role | Job | How many |
|---|---|---|
| Background | The surface everything sits on | 1, plus one raised variant |
| Text | Primary reading colour | 1, plus a muted and a subtle |
| Line | Borders and dividers | 1, plus a stronger variant |
| Accent | Identity, links, the primary action | 1 |
| Secondary accent | Intent and emphasis, used sparingly | 1 at most |
| Status | Success, warning, error | 3, and only if you show status |
That's around ten values, and it covers a complete product. Name them by role — `--color-text-muted`, not `--color-grey-400` — because a role name still makes sense when the theme changes, and an appearance name produces the absurdity of a "grey" that's light blue in dark mode.
Contrast is a constraint, not a preference
Contrast ratio is a measurement of the difference in luminance between two colours, from 1:1 (identical) to 21:1 (black on white). It's the difference between text that can be read and text that merely looks calm on your monitor.
| Element | Minimum ratio |
|---|---|
| Body text | 4.5:1 |
| Large text (about 24px, or 19px bold) | 3:1 |
| Icons and interface borders that carry meaning | 3:1 |
| Decorative elements | No requirement |
Check ratios in your browser's dev tools, which report them on hover in the colour picker. Do it while choosing the palette, not during an accessibility review six months later — retrofitting contrast means changing values that every screen already depends on.
The quantity rule
The most useful colour rule in interface design isn't about hue at all. It's about how much. A rough starting proportion: most of the screen neutral, a small share carrying secondary weight, and a very small share saturated.
Accent colour works because it's scarce. Applied to the primary button, the active nav item, and the link colour, it draws the eye exactly where you intended. Applied to eight elements on one screen, it stops meaning anything — the eye can't prefer everything.
What colour associations can and can't do
Colour carries associations, and they're real but weaker and more context-dependent than popular writing suggests. Some are learned conventions strong enough to design around; others vary by culture, by industry, and by individual, and building a decision on them is guessing.
- Reliable — red for stop, destructive, or error, in most interface contexts; green for confirmed or complete. These are conventions users have practised for decades
- Reliable — a saturated colour against neutrals draws attention. That's a property of contrast, not of the hue
- Weak — "blue conveys trust." It's common in finance and technology largely because competitors use it, which is a convention, not a mechanism
- Weak — precise emotional claims about specific hues. Effects reported in the research literature are small and highly context-dependent
Building a palette in an hour
- Write the role list firstBackground, surface, text, muted text, subtle text, line, accent. Seven names, no values yet.
- Choose the neutralsPick a background and a text colour that reach at least 12:1. Derive the muted and subtle text from the text colour, checking each against 4.5:1.
- Choose one accent, then test it as textMany brand colours pass as a button fill and fail as link text. When that happens, keep a darker variant specifically for text and borders.
- Build the dark theme by swapping role values onlyIf the roles are named properly, this is a list of new values, not a redesign.
- Check the whole thing in greyscaleIf the interface stops working, colour was doing a job that size, weight, and spacing should have been doing.
Common mistakes
- Choosing colours first and assigning roles afterwards
- Naming colours by appearance, which breaks the moment a theme changes
- Light grey body text that fails contrast but looks calm on a designer's monitor
- Using the accent on eight elements, so it emphasises nothing
- Relying on colour alone to signal an error or a required field
Key takeaways
- Around ten role-named values is a complete interface palette
- Contrast ratios are measurable thresholds, not matters of taste
- Accent colour works because it's scarce — quantity is the real rule
- Colour conventions are usable; precise emotional claims about hues are not
Try it yourself
Open your product and list every distinct colour value in use. Assign each one a role name. Any value you can't name a role for is a value that shouldn't exist — and merging it into an existing role is usually the whole fix.
