Color Theory for Interfaces
The working subset of colour theory for screens: three dimensions, a handful of harmonies, and perceptual colour spaces that behave predictably.
Definition
Colour on screen is described by hue, saturation and lightness, and manipulated through colour spaces. For interface work, perceptually uniform spaces such as OKLCH are more useful than HSL because equal numeric steps produce equal perceptual steps.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this plate
Reach for this when
- Building a palette from scratch.
- Converting a brand colour into a usable interface ramp.
- Choosing a colour space for design tokens.
- Starting a palette from scratch, or rebuilding one that has grown by accretion.
Common mistakes
- Too many hues.
- Reasoning about lightness in HSL.
- Wide-gamut colours shipped without an sRGB fallback.
Colour spaces you will actually use
| Space | Good for | Limitation |
|---|---|---|
| HEX and RGB | Interchange, developer handoff | No perceptual meaning. Cannot be reasoned about. |
| HSL | Quick manipulation, legacy code | Lightness is not perceptual. HSL 50 percent lightness is very different for yellow and blue. |
| OKLCH | Building palettes and themes | Wide browser support since 2023, but needs fallbacks for older targets. |
| LAB and LCH | Colour science, gradients | Similar benefits to OKLCH; OKLCH generally behaves better in the blue range. |
| P3 | Wide-gamut displays | Needs an sRGB fallback, and can exceed the gamut of older screens. |
Harmony schemes, and when each is useful
- Monochromatic: one hue at multiple lightness levels. Safest for interfaces, since it cannot clash.
- Analogous: neighbouring hues. Calm, and useful for sequential data.
- Complementary: opposite hues. Maximum contrast, which suits an accent against a neutral base.
- Split complementary: softer than complementary and easier to balance.
- Triadic: vivid and hard to control in interfaces. Usually too much for product UI.
Choosing a palette for an interface
Do
- Start from the one colour the product must have, then build everything else around it.
- Work in a perceptual space, so equal numeric steps look like equal steps.
- Decide the neutrals before the accents. They cover most of the screen.
- Check every foreground and background pair you intend to allow.
Do not
- Pick a harmony scheme first and fit the product to it.
- Use more than one accent until you can say what the second one means.
- Build a ramp by adjusting saturation, which moves lightness unpredictably in most spaces.
In practice
- i.
Building a ramp in OKLCH
Design systemsHolding hue and chroma steady while stepping lightness produces a ramp where each step feels evenly spaced. The same operation in HSL produces steps that bunch in the middle and wash out at the ends.
- ii.
The palette that could not express state
What to reserveA brand palette of five colours, all used decoratively, left nothing to say error or success with. Reserving hues for meaning before spending them on decoration is the order that works.
Local chart
FND·019 · Region II · Grid D1
This entry and the entries it is stated to connect with. Each line is labelled with what the connection means.
Sources
Where a source establishes something narrower than the popular reading of it, the note says so.
- [1]
- [2]
A perceptual color space for image processing
B. Ottosson, 2020
Introduces Oklab, the basis for OKLCH.
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Related concept
Connected closely enough to change how you apply this.
- Design TokensSYS·001 · Design system
- Brand Color in InterfacesFND·024 · UI foundation
- Color AccessibilityFND·028 · UI foundation
- Color SystemsFND·026 · UI foundation
- Dark ModeFND·027 · UI foundation
- Data Visualization ColorFND·029 · UI foundation
- HueFND·020 · UI foundation
- LightnessFND·022 · UI foundation
- NeutralsFND·025 · UI foundation
- SaturationFND·021 · UI foundation
- Semantic ColorFND·023 · UI foundation