CSS Color Level 4 settles its gamut mapping text

A full rainbow arching over the Horseshoe Falls at Niagara with a tour boat beneath it

CSS Color Level 4 got its first Candidate Recommendation Draft update in fifteen months on July 28, and the changes section is mostly about settling things that implementations had already shipped. Two values are now formally equivalent when they match in the same space, with missing components treated consistently, or when they match via oklab across spaces. Gamut mapping has pseudocode, a ray trace algorithm, an EdgeSeeker algorithm, and a choice of three methods. display-p3-linear joins the predefined spaces, rec2020 gets a defined gamma.

None of that changes what a browser does today. oklch(), lab(), and color() have been Baseline for a while. What it changes is the risk of building on them, which is now close to zero.

I think that moves a decision from someday to now. Most design systems I have seen still store their color tokens as hex or hsl, because that is what the tools exported and what everyone could read. Every one of those systems is carrying an avoidable migration: a palette that cannot express wide gamut colors, lightness steps that are not perceptually even, and a dark theme derived by arithmetic that does not match how eyes work.

My view is that perceptual color spaces and gamut mapping belong in the token layer, where the scale is defined once, rather than in a future redesign. The spec text is settled. The excuse is gone.

What format does your design system store its colors in, and who decided that?

Photo source: https://photos.robertstowe.com/niagara