Skip to content

Color

sRGB

The standard color space most screens have used for decades. All hex values live here. Its gamut is limited: there are colors a modern display can show that sRGB cannot describe.

#4080c0
Red · R64
Green · G128
Blue · B192

P3

A wider color space supported by most modern screens. Allows more vivid colors, particularly greens and reds, that sRGB cannot reach.

sRGB
Display P3

P3 needs a compatible display and browser. Other screens show the sRGB fallback in both circles.

OKLCH

A color space that matches how humans perceive brightness. Unlike HSL, two colors at the same lightness value actually look the same brightness. Useful for generating palettes and accessible color mixes.

HSL · L 65%
OKLCH · L 65%
Lightness · L65%

Every color in a row shares the same L value. Compare the changes in brightness across each row.

Alpha

The transparency component of a color, from fully opaque to fully invisible. An alpha border recedes into the surface beneath it. A solid hex sits on top. The difference is subtle but consistently felt.

Alpha 50%#808080
Alpha50%

Compare an alpha border with solid #808080 on different surfaces.

Semantic token

A color variable named for its purpose rather than its value. --color-border-subtle instead of #e0e0e0. When the value changes, everything using the token updates.

In progressA new idea
Project name
Continue
--color-border-subtle
#e0e0e0

Change --color-border-subtle to update all three borders together.

Contrast ratio

The luminance difference between a foreground and background color. WCAG requires 4.5:1 for body text, 3:1 for large text and UI components.

6.28:1
AA body · PassAA large · PassAA UI · Pass
Text gray level96

WCAG AA: 4.5:1 for body text; 3:1 for large text and UI components.