You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means that e.g. if we fill the whole image with any color from the P3 color space that doesn't exist in sRGB color space, then quantize function will not return the same identical color as the dominant color of that image.
Technically, OKLCH can represent any color visible to the human eye.
You can play around with https://oklch.com to construct colors that can't be displayed on displays that doesn't support P3/Rec2020 or on any existing device.
The HCT color model is just the CAM16 color model paired with CIE Lab lightness. It can support P3 and Rec. 2020 because CAM16 and CIE Lab can support these gamuts. It should be noted that color spaces that extend outside of the visible spectrum (ProPhoto RGB) can stress the CAM16 algorithm as the geometry of the space in the blue region starts to wrap around into itself, so HCT would have similar limitations, but most reasonable gamuts should be supported. OkLCh also can experience weird distortions in its geometry when extended past the visible spectrum as well.
I've implemented HCT as a normal color space, and as you can see it can be rendered within the Rec. 2020 gamut just fine. I think this library just doesn't support gamuts beyond sRGB currently, but there is nothing limiting the potential to extend it further.
I've found that
material-color-utilities
uses sRGB color space under the hood in many places in the code, e.g. in the image quantizer:material-color-utilities/typescript/utils/image_utils.ts
Lines 70 to 75 in f5d03da
Also
material-color-utilities/typescript/utils/image_utils.ts
Line 33 in f5d03da
instead of:
This means that e.g. if we fill the whole image with any color from the P3 color space that doesn't exist in sRGB color space, then
quantize
function will not return the same identical color as the dominant color of that image.E.g. OKLCH color model supports not only sRGB color space, but also wide-gamut color spaces (P3, Rec2020 and beyond). See https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl.
Technically, OKLCH can represent any color visible to the human eye.
You can play around with https://oklch.com to construct colors that can't be displayed on displays that doesn't support P3/Rec2020 or on any existing device.
It's not clear from the https://material.io/blog/science-of-color-design blog post if HCT color model supports wide gamut (colors beyond sRGB) or not?
The text was updated successfully, but these errors were encountered: