Back to Gallery

How Colour Systems Work

Ever wondered why some colour palettes feel perfectly balanced while others seem off? It's not just maths — it's perception. Here's how modern UI colour systems are designed to work with the way we actually see — and why the colour models underneath matter.

When Maths Gets Colour Wrong

Not all colour spaces are created equal. When you create evenly-spaced colours mathematically, they don't always look evenly-spaced to the human eye. That's where perceptual colour models come in.

Most UI designers work with RGB (Hex is just another way to represent RGB), HSL, and more recently, OKLCH.

RGB is how computers store colour — three channels (Red, Green, Blue) mixed together. It's based on how monitors work, not how we see. Not perceptual — equal mathematical steps don't look equal.

HSL (Hue, Saturation, Lightness) makes RGB more intuitive, but still isn't perceptually uniform. Yellow appears brighter than blue at the same "lightness."

OKLCH (Lightness, Chroma, Hue) is a modern perceptual model based on human vision research. Equal numerical steps create equal perceived differences. Used by Tailwind v4 and modern design systems.

See the Difference: Perceptual vs Mathematical

These three gradients use the exact same start and end colours, with 11 evenly-spaced steps. Notice how different they look?

OKLCH (Perceptual) Smooth, even transitions
L: 66%
C: 0.21
H: 354°
L: 66%
C: 0.21
H: 371°
L: 66%
C: 0.20
H: 388°
L: 67%
C: 0.19
H: 405°
L: 67%
C: 0.19
H: 422°
L: 68%
C: 0.18
H: 438°
L: 68%
C: 0.17
H: 455°
L: 68%
C: 0.17
H: 472°
L: 69%
C: 0.16
H: 489°
L: 69%
C: 0.16
H: 506°
L: 70%
C: 0.15
H: 522°
HSL Uneven lightness across hues
H: 330°
S: 81%
L: 60%
H: 313°
S: 81%
L: 58%
H: 296°
S: 82%
L: 56%
H: 279°
S: 82%
L: 54%
H: 262°
S: 82%
L: 52%
H: 245°
S: 83%
L: 50%
H: 228°
S: 83%
L: 48%
H: 211°
S: 83%
L: 46%
H: 194°
S: 84%
L: 44%
H: 177°
S: 84%
L: 42%
H: 160°
S: 84%
L: 39%
RGB (Linear) Muddy, desaturated middle
R: 236
G: 72
B: 153
R: 214
G: 83
B: 151
R: 192
G: 95
B: 148
R: 170
G: 106
B: 146
R: 148
G: 117
B: 143
R: 126
G: 129
B: 141
R: 104
G: 140
B: 139
R: 82
G: 151
B: 136
R: 60
G: 162
B: 134
R: 38
G: 174
B: 131
R: 16
G: 185
B: 129

So What's the Difference?

OKLCH is designed around how we actually see colour, not how computers store it. When you space colours evenly in OKLCH, they look evenly spaced. That's why frameworks like Tailwind CSS are moving towards perceptual colour models — the maths finally matches what our eyes see.

How Tailwind CSS Creates Balanced Palettes

Tailwind's colour palettes aren't just mathematically evenly-spaced — they're carefully tuned to look evenly-spaced. Here's the difference that makes.

Tailwind's Hand-Tuned Palette

Carefully balanced for visual consistency

Perceptually Balanced
50
100
200
300
400
500
600
700
800
900
950

Linear OKLCH Interpolation

From base (500) to white/black — evenly-spaced mathematically, but looks uneven

Mathematically Even
50
100
200
300
400
500
600
700
800
900
950

Lightness: Perceived Brightness

Lightness measures brightness from 0% (black) to 100% (white). Tailwind's curve isn't perfectly straight — it's subtly adjusted for better visual balance in the mid-tones (400-600) and darker shades (800-950) where our eyes are most sensitive.

0%25%50%75%100%50100200300400500600700800900950

Chroma: Keeping Colours Vibrant

Chroma measures colourfulness — how vivid vs grey a colour appears. Tailwind maintains higher saturation throughout the scale, keeping colours punchy even at extremes. Linear interpolation loses chroma as it approaches white and black, making colours look washed out.

00.10.20.30.450100200300400500600700800900950
Tailwind (Hand-Tuned)
Linear OKLCH

What's Really Going On Here

Tailwind's curves show two key adjustments: subtle tweaks to lightness in the mid-tones (400-600) and darker shades (800-950), plus maintained saturation throughout the scale. Linear interpolation produces mathematically even steps, but Tailwind's hand-tuning ensures each colour looks like an equal jump in brightness while staying vibrant. That's design driven by how we see, not just what the maths says.

A Brief History of Colour Models

The evolution from monitor phosphors to perceptual colour science.

1960s–1970s

RGB: Born from Hardware

RGB wasn't designed for humans — it was designed for CRT monitors. Red, green, and blue phosphors were the three colours screens could physically emit, so that's how computers stored colour data. Simple, efficient, but terrible for intuitive colour manipulation.

1970s

HSL/HSV: Making RGB Human-Friendly

Designers needed something more intuitive than "mix 143 parts red with 67 parts green." HSL (Hue, Saturation, Lightness) transformed RGB into cylindrical coordinates — pick a colour on the wheel, adjust how vibrant it is, adjust how light or dark. Much better for designers, but still not perceptually uniform.

1976

CIELAB: The First Perceptual Model

The International Commission on Illumination (CIE) introduced Lab, the first colour space designed around human perception. Equal distances in Lab correspond to equal perceived colour differences. Revolutionary for colour science, but the math was complex and it didn't map cleanly to RGB displays.

1990s

Web-Safe Colours: Early Digital Constraints

In the early web era, not all monitors could show millions of colours. The "web-safe" palette of 216 colours ensured consistency across 8-bit displays. It wasn't a new model, but it shaped how designers thought about colour on screen — precision through limitation.

2020s

OKLCH: Perceptual Colour for Modern UI

Oklab (2020) and its cylindrical form OKLCH combined the best of both worlds: perceptually uniform like Lab, but designed for modern RGB displays and easier to use. CSS adopted it, Tailwind v4 embraced it, and now designers can finally build colour systems that look as balanced as the math suggests they should be.

2030s+

The Adaptive Future

Colour systems are moving beyond static palettes. Wide-gamut displays, HDR, and adaptive schemes like Material You and macOS tints will make colour dynamic — shifting with context, preference, and light. The future of colour is responsive, accessible, and alive.

From Hardware to Human Vision

For decades, we've used colour models built for hardware convenience (RGB) or mathematical simplicity (HSL), not human perception. OKLCH represents a fundamental shift: colour systems based on how we actually see, not how monitors work. The result is palettes that feel balanced and natural — no endless manual tweaking required.

Learn More

Curated resources to deepen your understanding of colour systems, perceptual models, and design system implementation.

Glossary

Colour Space
A mathematical model for representing colours as numbers. Examples: RGB, HSL, OKLCH, CIELAB. Different spaces organize the same colours in different ways.
Colour Model
The underlying mathematical structure that defines how colours are calculated and interpolated. Often used interchangeably with "colour space."
Colour System
A complete set of colours designed to work together, including their relationships, naming conventions, and usage guidelines. Examples: Tailwind CSS palette, Material Design colours.
Colour Scheme
The specific selection and arrangement of colours used in a design. Can be monochromatic, complementary, analogous, triadic, or custom.
Perceptually Uniform
A property where equal numerical differences in colour values correspond to equal perceived differences to the human eye. OKLCH and CIELAB are perceptually uniform; RGB and HSL are not.
Lightness (L)
In OKLCH, the perceived brightness of a colour from 0% (black) to 100% (white). Different from HSL's "lightness" which isn't perceptually uniform.
Chroma (C)
In OKLCH, the colourfulness or saturation — how vivid vs grey a colour appears. Higher values are more saturated. Range typically 0 to 0.4, though varies by hue.
Hue (H)
The position on the colour wheel, measured in degrees (0-360°). Red ~30°, Yellow ~90°, Green ~140°, Blue ~250°, Magenta ~330°. Consistent across HSL and OKLCH.

Want to Explore More?

Check out our interactive colour tools to put these concepts into practice.