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

> I was assuming that negative channels weren't meaningful, 

They are.

> but if you treat them as such and normalize it back in-gamut, you do indeed get the hue shift we were looking for.

Also if you treat them as such and *don't* gamut map back into gamut.They are still colors (unless they are actually outside the spectral locus, in which case they are non-physical imaginary colors, but you can still do math on them and get meaningful results. ProPhoto RGB, for example, has imaginary primaries; so does XYZ).

> My mistake was in assuming that negative channels weren't even physically meaningful (unlike overly-large channels, which make sense). I'm still not sure what a negative channel could mean

The original 1920-30s color matching experiments presented, one one side, a monochromatic color to match and on the other side, the mixture of three colored lights. (To ensure cross-lab compatibility, these were monochrromatic lights derived from the mercury emission spectrum). Subjects had to match the color by adjusting the intensity of the three lights until they matched the reference.

For some colors (some wavelengths), no match could be obtained. In that case, a mixture of the three colored lights was added *to the reference* to change the color so it could be matched. That was counted as a negative amount of the respective light.

This is how the CIE color matching functions were measured.

Then (because this was 1932 and negative numbers were a hassle in the days of slide rules and log tables) they transformed the matching functions to a set of physically unrealizable, supersaturated primaries called X, Y and Z specifically so that all real-world colors never needed  a negative amount to match.

For physically realizable primaries, there will always be some real colors that need negative, or greater than 100%, amounts of a color to match.

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


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

Received on Friday, 2 April 2021 06:08:30 UTC