Introduction to Color Science

Light, eyes, and why color is a perception — not a property of objects.

There is no “blue” in a beam of light - only a wavelength. Color happens later, inside your visual system. Understanding that one idea explains almost everything else in this guide: why we can encode any color with three numbers, why different screens disagree, and why some color pairs are indistinguishable to some viewers.

Light and the visible spectrum#

Visible light is electromagnetic radiation with wavelengths between roughly 380 nm (violet) and 700 nm (red) - a razor-thin slice of the full electromagnetic spectrum. A light source rarely emits a single wavelength; it emits a spectral power distribution (SPD): some amount of energy at every wavelength. Sunlight is a broad, fairly even SPD; a red laser is a spike at one wavelength; a white LED is a blue spike plus a broad yellow hump.

380 nm500 nm600 nm700 nm
An approximation of the visible spectrum from 380 nm to 700 nm. A real spectrum contains colors no screen can fully reproduce.

When light hits an object, the surface absorbs some wavelengths and reflects others - a lemon reflects long and medium wavelengths and absorbs short ones. What reaches your eye is the product of the light's SPD and the surface's reflectance. Change the light and the product changes too, which is why clothes that matched in the store can clash in daylight.

Eyes: three cones, three numbers#

Your retina samples that incoming spectrum with just three types of cone cells, each sensitive to a broad, overlapping band of wavelengths:

  • S cones- short wavelengths, peaking near 440 nm (“blue”).
  • M cones- medium wavelengths, peaking near 535 nm (“green”).
  • L cones- long wavelengths, peaking near 565 nm (“red” - though it actually peaks in yellow-green).
400 nm500 nm600 nm700 nmsensitivityS cones (~440 nm)M (~535 nm)L (~565 nm)
Normalized cone sensitivities (stylized). Note how heavily L and M overlap - most light excites both. Color-blindness chapters build directly on this diagram.

However complex the incoming spectrum is, the eye reduces it to three numbers - the total excitation of S, M, and L cones. This is trichromacy, and it is the reason every color model you will ever use (RGB, HSL, CIELAB, OKLCH) is three-dimensional. It is also why displays get away with mixing just three primaries: they don't need to reproduce the original spectrum, only the same three cone responses.

Color is a perception#

Cone responses are still not “color.” The brain compares signals between cone types (opponent processing: red-vs-green, blue-vs-yellow, light-vs-dark), normalizes for the current lighting (chromatic adaptation- a white page looks white under both warm and cool light), and factors in surrounding context. The same physical patch can look different against different backgrounds - the basis of simultaneous-contrast illusions and of the famous photo of “the dress.”

So a “color” is best understood as the experience produced by a spectrum, in a context, in a visual system. Color science is the discipline of modelling that chain precisely enough to make numbers we can trust.

Why this matters for design#

  • Three channels are enough - but only if you know which three. Device channels (RGB) are convenient for hardware; perceptual channels (lightness, chroma, hue) are convenient for humans. Most of this guide is about moving between the two.
  • Perception is nonlinear - doubling light does not double perceived brightness. Models that ignore this (like raw RGB or HSL) produce uneven palettes and muddy gradients.
  • Viewers differ - about 1 in 12 men is missing or has a shifted cone type. Palettes must carry information through more than hue alone.
  • Context differs - displays have different gamuts and white points; environments have different lighting. Robust color systems state their assumptions (sRGB, D65) explicitly.

Further reading#