Re: [csswg-drafts] [css-color-4] Gamut Mapping Algorithm and Color Banding (#7135)

I've actually had some more time to play with this and experiment. I don't think you actually have to change the algorithm, just the limit. I would tentatively suggest moving from `0.02` to `0.003`.

The issue is that when you have two adjacent colors, which are already some distance apart, and then you have a full JND range of `0.02` in which you are allowed to clip, if you clip one on the low end and one on the high end, coupled with the distance of the already adjacent colors, you maximize the worst-case distance and push things over to a more abrupt change in color. What I was originally doing is ensuring consistency of when the clipping occurs, clamping it on the high end as it seems to yield better performance, but if you just reduce the window, it seems you can avoid the issue that way as well, and it is still faster.

I think `0.003` seems to look pretty ok so far. I'm doing a little more testing, but so far it give the best performance while eliminating the banding.

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


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

Received on Saturday, 12 March 2022 22:22:56 UTC