Re: [csswg-drafts] [css-color-5] How should negative percentages behave in color-mix()? (#6047)

I think the reason you are getting odd numbers is because the result is slightly out of gamut, as would happen in every case where the color with the negative coefficient has zeroes.

However, if you compare the LCH hues, it does go *slightly* away from green. Also, if you compare the deltaE of the mixed color with pure green, you'll see the mixed color is slightly further from green than the middle-red was, though not by much if using deltaE 2000 (larger difference with 76).

However, most importantly, using red and green to make a point here is misleading. It is well known that (gamma-encoded) sRGB interpolation between red and green is weird, even if you stay within 0-100%. E.g. `color-mix(in srgb, rgb(100 0 0), rgb(0 100 0))` returns `rgb(19.6% 19.6% 0%)`, which is also somewhat unexpected.

(Editable) calculations here: https://colorjs.io/notebook/?storage=https%3A%2F%2Fgist.github.com%2FLeaVerou%2F5b36f292d4b86eb0ea7ad37413ba8180

![image](https://user-images.githubusercontent.com/175836/113220765-c29ce300-9251-11eb-9f95-4ad05397459e.png)


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


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

Received on Wednesday, 31 March 2021 22:51:13 UTC