-
Notifications
You must be signed in to change notification settings - Fork 756
Description
When adjusting lightness in Oklab/Oklch/Lab/LCH, what is expected behavior?
This is related to handling out-of-gamut colors, because:
- As lightness decreases we reach imaginary colors with no physical meaning.
- As lightness increases we reach real colors that cannot be shown on most displays.
I'm filing a new issue, because since Chrome 120, lightness exactly equalling 0 or 100% are mapped to black and white respectively. This led to a discontinuity and browsers now handle these cases differently:
https://wpt.live/css/css-color/oklab-l-almost-0.html (subtle difference)
https://wpt.live/css/css-color/oklab-l-almost-1.html (very apparent difference)
See also results on wpt.fyi
In web-platform-tests/wpt#45073 (comment), @svgeesus explained that the spec previously "effectively mandated a discontinuity", but that's no longer the case, so Chrome appropriate fails these tests now.
Oklab gradients with endpoints close to 0/100% are also affected. Demo at https://codepen.io/foolip/pen/zYXZPYr, with Chrome rendering inlined here:
In Firefox and Safari, all gradients look like the last case.
The fastest way to get back to an interoperable state would be to revert the Chrome change, so that all browsers do channel clipping, but ideally the behavior would only change once. I'm filing this issue as background reading for the breakout session planned on March 27.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status



