[csswg-drafts] [css-color-4] Gamut mapping algorithm result in visible difference to actual gamut limit (#9489)

tiaanl has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Gamut mapping algorithm result in visible difference to actual gamut limit ==
Referring to: https://drafts.csswg.org/css-color-4/#binsearch

After implementing the algorithm in Gecko and playing around with the results, I found that the results are sometimes visibly different from what it should/could be.

I adjusted the `JND` value to get closer to the real gamut limit and also tracked the number of iterations used to calculate it. As expected, the smaller the JND, the closer we get to the actual gamut limit (without too many more iterations).

As it is very hard to test the results right now (depending on hardware used, etc.), I'm not 100% sure what the acceptable results are here.

Results of mapping to `sRGB` from `display-p3` colors:

![image](https://github.com/w3c/csswg-drafts/assets/2261995/829ab28e-fdfb-41fc-b0b2-0fd50d634197)


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9489 using your GitHub account


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

Received on Wednesday, 18 October 2023 09:34:03 UTC