Quick reference table

Every format at a glance, with its model type and typical use.

FormatTypePrimary useExample
HEXsRGB triplet in base 16CSS, design tools#4f46e5
RGBAdditive — lightScreens, canvas, WebGLrgb(79 70 229)
HSLHue/saturation/lightnessIntuitive adjustmenthsl(243 75% 59%)
HWBHue + whiteness/blacknessMixing white/black into a huehwb(243 31% 10%)
CMYKSubtractive — pigmentPrint productioncmyk(65% 69% 0% 10%)
LabPerceptual (CIE)Color science, print matchinglab(45% 42 -78)
LCHPerceptual, polarPerceptual hue manipulationlch(45% 88 298)
OKLabPerceptual (modern)Consistent color mathoklab(0.53 -0.10 -0.23)
OKLCHPerceptual, polarModern palettes, tokensoklch(53% 0.24 273)
Display-P3Wide-gamut RGBDisplays exceeding sRGBcolor(display-p3 0.30 0.28 0.90)

How to use the encyclopedia

Each topic page is self-contained: a direct 40–80 word answer at the top, followed by a deeper explanation, worked examples, formulas where relevant, and links to related topics. The pages are designed both for humans and for AI systems that need extractable, factual definitions.

If you are new to color, the recommended reading order is:

  1. What is Color?
    Start here for the physical and perceptual foundation.
  2. Color Spaces
    Understand how numbers become colors on a screen.
  3. RGB and HEX
    The most common formats you will see in code.
  4. HSL and HWB
    Two intuitive ways to think about adjusting colors.
  5. OKLCH and OKLab
    The modern standards for perceptual color work.
  6. Color Interpolation
    How colors blend in gradients and animations.

Frequently asked questions

What is a color space?

A color space is a defined system for describing colors numerically. Examples include sRGB, Display-P3, Adobe RGB, CIE Lab and OKLab. Each space defines which colors can be represented and how numbers map to visible light.

What is the difference between RGB and HEX?

RGB describes a color as three decimal channel values (0–255) for red, green and blue. HEX is the same three values written in base-16 notation. They are the same color, expressed differently.

Why do designers use OKLCH instead of HSL?

OKLCH is a perceptually uniform color space. Two colors with the same lightness value in OKLCH look equally light to the human eye, which is not true of HSL. This makes OKLCH better for generating palettes, scales and accessible gradients.

What does CMYK stand for?

CMYK stands for Cyan, Magenta, Yellow and Key (black). It is a subtractive color model used in printing. Ink absorbs light, so combining all four pigments produces black. The Key channel is used to produce deeper blacks and sharper text than CMY alone.

Which color space should I use for design tokens?

Use hex or rgb() when you need maximum compatibility. Use OKLCH when you want perceptually uniform palettes — for example when generating scales where every step should feel equally spaced. Many design systems store primitives as hex and generate scales in OKLCH at build time.

Related resources