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

> Maybe I'm missing something. How would you handle interpolating between e.g. `hsl(none 0% 50%)` and `lch(50% 0% none)` in e.g. OKLab?

Yeah, I think the spec is unclear on this point. It does mention this:

> If the colors to be interpolated are outside the gamut of the interpolation space, then once converted to that space, they will contain out of range values.

But it doesn't explicitly state that colors are first converted to the interpolation space _before_ applying any undefined channel resolution.

It was my understanding that each color would be converted _first_ to the interpolation color space  (Oklab) and _then_ have hue fixups applied, undefined channels resolved, and then premultiplication.

In the specific example posed in the question, none of the undefined channels persist after conversion to Oklab. Both colors convert to perfectly reasonable achromatic Oklab colors and the interpolation occurs without issues. 

<img width="643" alt="Screen Shot 2022-07-31 at 7 56 45 AM" src="https://user-images.githubusercontent.com/1055125/182029816-07d50344-18b7-46bd-aea2-0b33f828e76a.png">

I think the spec could make this much clearer.


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


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

Received on Sunday, 31 July 2022 14:02:17 UTC