Re: [csswg-drafts] [css-color-5] Gamut mapping in HSL/HWB (#7107)

Part of the issue is the examples were most likely generated with https://colorjs.io/. They haven't been updated since the spec suggested using Oklch to gamut map. I believe the CSS examples still reflect what color.js is using. 

1. Color.js is using Lch, not Oklch, so if you implement gamut mapping to the spec, it'll be different.
2. The algorithm in general is also slightly different. I think the CSS algorithm is tuned to be a bit faster as it limits the ∆E calls. This results in chroma sometimes being a bit more aggressively reduced than it is in Color.js (at least that is what I have observed). 

Anyways, I'm pretty sure the examples need to be updated, assuming Oklch remains the best choice for gamut mapping: https://github.com/w3c/csswg-drafts/issues/7071.


-- 
GitHub Notification of comment by facelessuser
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7107#issuecomment-1060264966 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 7 March 2022 07:20:09 UTC