Re: [csswg-drafts] [css-color-4] Achromatic colors converted to hue-ish spaces should treat hue as "missing", not NaN (#6107)

> If a color with a none chroma gets displayed, then the none gets turned into 0%, and then the hue becomes powerless. That won't affect rendering directly, but if you then convert the color into another space, the hue will indeed become none itself and then have the defined effects.

Okay, that sounds like in this case hue would not become "powerless' until `none` in the chroma channel is forced to be evaluated. So you could define chroma as `none` to interpolate with another color and take its chroma, and the hue would be unaffected and interpolated just fine. Only when displayed, or forced into a conversion would the hue be evaluated resulting in a "powerless" state. That sounds reasonable.

> Note that this isn't behavior for when alpha is omitted (that works as you expect - rgb(255 0 0) does indeed default its alpha to 100%), but rather for when alpha is explicitly marked as "not provided so it can take the value from the other color in a transition". Alpha is never powerless, so this can never happen automatically; the author has to explicitly mark it, or use relative color syntax to calculate alpha from a color channel that is missing.

Right, I believe this was solely from an interpolation perspective, not `alpha` being powerless due to omitting. This is why first my statement was that I don't see how it would matter if alpha was represented as 0 or 1 if `none`, but I see the request from @danburzo was more from a user perspective wanting to evaluate the color, maybe through debugging or whatever, by having it treated as 1. It looks like there are a number of color libraries that do it this way, probably for that very reason. I'm not sure I have any strong feelings about it, but I can see how the request may be useful.

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


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

Received on Monday, 4 October 2021 17:12:41 UTC