Re: [csswg-drafts] [css-color-4] Missing info about Premultiplication and Undefined values (#7536)

Hmm, I am worried a little bit about the resolution. This will definitely cause the intent of colors to change. There are certain cases that will turn out okay, but I think there could be plenty of cases where the intent of the color will be different.

We can see that for two RGB color spaces, preserving the NaN over each iteration changes the color:

<img width="786" alt="Screen Shot 2022-08-02 at 10 55 00 AM" src="https://user-images.githubusercontent.com/1055125/182432577-2f0a0a31-b58d-4fb5-a065-dd415b5a6a97.png">

The idea of handling hues (or I should be more specific achromatic hues), I thought would get handled already which may be the main concern.

> User agents may treat a component as [powerless](https://www.w3.org/TR/css-color-4/#powerless-color-component) if the color is "sufficiently close" to the precise conditions specified. For example, a gray color converted into [lch()](https://www.w3.org/TR/css-color-4/#funcdef-lch) may, due to numerical errors, have an extremely small chroma rather than precisely 0%; this can, at the user agent’s discretion, still treat the hue component as powerless. It is intentionally unspecified exactly what "sufficiently close" means for this purpose.

> Note: As a reminder, if the interpolating colors were not already in the specified interpolation syntax, then converting them will turn any [powerless components](https://www.w3.org/TR/css-color-4/#powerless-color-component) into [missing components](https://www.w3.org/TR/css-color-4/#missing-color-component).

So, specifically tracking hues and translating them over to other cylindrical-based spaces seems unnecessary as that will happen during the conversion process for achromatic colors.

Alpha, strikes me as the only other channel that stands out as a good candidate for maybe specially surviving conversion as it doesn't even contribute to the conversion. It could just be sidestepped in that process.

Anyways, maybe some of this info is helpful 🤷🏻.



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


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

Received on Tuesday, 2 August 2022 17:20:25 UTC