opyeb ColorOKLCH

15 guides · Gamut

Gamut — the edges of sRGB, Display-P3 and Rec.2020

Basis 28 November 2026 · Gamut · about 7 min

A gamut is the range of colours a colour space can represent. sRGB dates from 1996 and nearly every screen supports it. Display-P3 is wider and supported by current laptops, phones and monitors. Rec.2020 is the broadcast standard with the widest range of the three. A wider gamut holds more vivid colour, but those values cannot be stored as 8-bit hex.

Comparing the ranges

SpaceCIE 1931 chromaticitySupport8-bit hex
sRGBabout 36%almost every screenyes
Display-P3about 45%recent Apple devices, some monitorsno, approximation only
Rec.2020about 76%UHD broadcast, some TVsno

Display-P3 fully contains sRGB, so an sRGB colour is the same colour on a P3 display. The reverse is not true: P3 colours outside sRGB are mapped to the nearest sRGB colour, and what “nearest” means changes the result, which is why CSS specifies its own gamut mapping.

Testing with OKLCH

The test is simple. Convert the OKLCH value to linear sRGB: if all three channels sit between 0 and 1 it is inside sRGB; if any channel leaves that range it is outside. For Display-P3, convert through XYZ D65 into linear P3 and check again. The calculator runs both tests and badges every step: green for sRGB, orange for P3 only, red for outside both.

R = 4.0767·l − 3.3077·m + 0.2310·s
G = −1.2684·l + 2.6098·m − 0.3413·s
B = −0.0042·l − 0.7034·m + 1.7076·s
(all three within 0–1 means inside sRGB)

Hue makes the difference

The same chroma has different headroom depending on hue. Yellow around H 90 and green around H 140 hold 0.2 and more inside sRGB, while blue at H 250 and violet at H 300 reach the edge around 0.15. Red at H 25 sits in between. A fixed C across twelve hues therefore clips some colours and leaves others looking washed out.

There are two answers: give each hue its own chroma, or allow the colour to leave the gamut and prepare a fallback. The first keeps the palette visually even but changes vividness between hues; the second keeps vividness but shows an approximation on older screens. The calculator takes the second route by default and shows how much was clipped.

Rules that hold up

Gamut percentages are the usual figures for the CIE 1931 chromaticity diagram; exact numbers vary with the measurement method.

Questions

Does saving a P3 colour as hex change it?

Yes. Hex is 8-bit sRGB, so it cannot hold a P3 colour. A chroma-reduced approximation is stored, and the original survives only in oklch() or color(display-p3 ...).

What happens if I use an out-of-sRGB colour anyway?

The browser maps it to the display gamut. Mapping algorithms differ slightly, so the same value can look marginally different across browsers.

Where can I see the gamut status?

The palette tab badges every step, and the exported code carries the clipped chroma in a comment.

Raise chroma to 0.3 and see which steps leave sRGB first.

Open the tool

Basis date 28 November 2026. Written against the W3C specifications, the APCA documentation and published browser support tables; updated when they change.

Back to the guides