Email or username:

Password:

Forgot your password?
Lea Verou

I hate to say “I told you so”, but @svgeesus and I did warn browser vendors that shipping wide gamut support without gamut mapping would render these color spaces almost unusable.

They thought we were exaggerating.
They thought getting out of gamut is an edge case.
They thought clipping was “good enough”.

Well… this is one of these times that I’m really not happy to have been right. 😕
github.com/w3c/csswg-drafts/is

Worse yet, the CSS impls are many folks’ first contact with these color models 😞

8 comments
Manuel Matuzović

@leaverou WTF? I thought the whole reason for oklch/oklab, besides access to a wider gamut, was perceptual uniformity? Just yesterday a told a group of 40 people in a workshop about how great that is compared to HSL and not this?

Lea Verou

@matuzo Yes, if you’re in gamut of the output device. But you lose some perceptual uniformity when out of gamut. Still better than HSL but less so in that case (especially when there’s no gamut mapping).

Manuel Matuzović

@leaverou That's bad news. :( Do you know where I can learn what "clipping" means in that case?

Lea Verou

@matuzo Clipping means instead of doing something more sophisticated to bring the color within screen gamut you just convert it to RGB and clip r, g, b to (0%, 100%). This tends to produce good results when slightly OOG but pretty bad results the farthest out of gamut you go.

Henri Sivonen

@leaverou Question as a user: I have Lightroom Classic set to export as Display P3 on the (untested!) assumption that raw could exceed sRGB. Most content in my photos is within the sRGB gamut. With clipping, it seems to me that viewing my photos on an sRGB display is almost always fine (except some 8-bits per channel precision is wasted).

With gamut mapping, wouldn’t all my photos get their gamut squished on an sRGB display just because they declare Display P3 (without fully using it)?

Lea Verou

@hsivonen gamut mapping algorithms used for photos are totally different and focus on maintaining the relationships between the colors in the image, whereas in the CSS one we focus on preserving as much of the individual color “identity” as possible (hue and lightness). CSS gamut mapping does not affect embedded images.

Henri Sivonen

@leaverou Doesn’t that break the ability to match CSS colors to image colors? Seems like an unhappy result if the page author intends a CSS-colored thing to seamlessly continue from an image and it looks like that on their screen but not on other screens.

Go Up