Color
Using color for meaning, emphasis and brand, with enough contrast.
Color in interfaces should carry meaning, such as state, emphasis or category, more than decoration. Limited palettes with defined roles keep things consistent. Contrast has to work for everyone, including in dark mode.
Why it matters for a product engineer
Colour in an interface should mean something: a state, an action, a category, a warning. A small palette with defined roles keeps the product consistent and easy to read. Contrast has to work for everyone, in light and dark mode. Engineers turn the palette into tokens, so they decide whether the rules hold everywhere.
How to do it
- Define a small palette, and give each colour a role: text, background, action, success, warning, error.
- Store the colours as tokens with names that describe the role, such as
danger, notred-500. - Check contrast for every pair of text and background, including on images and in dark mode. Normal text needs a ratio of at least 4.5 to 1.
- Never use colour as the only signal. Add an icon, a label or a pattern.
- Build dark mode from the same roles, with colours checked again, not inverted.
- Add a check to the build that fails on a raw colour value outside the tokens.
Common mistakes
- Grey text that looks elegant and is hard to read.
- Red and green as the only difference between two states.
- Many near-identical colours that nobody chose on purpose.
- Light text on a light, animated background.
- Dark mode made by inverting colours.
Example
RelievApp uses ten colours and no others, each with a meaning: coral is the hard end, sun is energy that works for you, mint is settled. A session moves from its hard colour to its settled one, so the colour itself shows the change. An earlier audit had found the opposite problem: white text over a pale mint sphere that almost disappeared. (RelievApp in In practice)
Low contrast text on the top million home pages, 2026
- 83.9%
- Home pages with low contrast text
- 34
- Distinct cases per page, on average
- Up 15% from 2025
Low contrast is the most common accessibility failure on the web, and it is a colour decision.
MeasuredWebAIM, The WebAIM Million, 2026 report
Sources: Color and contrast (web.dev) ↗ · The WebAIM Million, 2026 report (WebAIM) ↗
In practice
Real products- 18 Nov 2026RelievApp, Part I: is it a meditation app?
Resources
2- courseStart here
Color and contrast ↗
web.dev (Google) · 2022 · 8 minHow contrast ratios work, the WCAG thresholds, and the tools that check them for you.
- articleGo deeper
Building a color scheme ↗
Adam Argyle (web.dev) · 2021 · 15 minBuilding a light and dark palette in CSS with enough contrast in both, step by step.
Tools
1- ToolFree
WebAIM Contrast Checker
Checks whether a text and background color pair meets the WCAG contrast ratios.