Re: [csswg-drafts] [css-color-4] [css-color-5] inconsistent mentions of powerless components in `white`. (#8609)

> But the specification is perfectly clear on what to do in this case.

Yes, CSS has conventions for undefined values when converting to other colors, but I'm talking about the color model.  I'm trying to illustrate why what you are suggesting makes no sense. But. let's take one more approach and let's incorporate the conversion logic.

When we are interpolating `oklch(1 none none)` and `color(--oklch 0.45201 0.31321 264.05 / 1)`, they are already in the OkLCh color space, and since we are interpolating in OkLCH, no conversion is needed. They are taken as is. The `none` will be respected by interpolation. The left side of the interpolation now becomes `oklch(1 0.31321 264.05)` after resolving `none` per the interpolation rules. We interpolate everything. Now we need to convert out of OkLCh. All values now have super high chroma, but when the lightness is close to 1, we can assume chroma is powerless and make it 0. I don't know what a good value is, so let's assume the lightness is 1e-3 just to make the results visible.

We get a small band of white at the beginning.

<img width="1345" alt="Screenshot 2023-03-30 at 6 47 25 AM" src="https://user-images.githubusercontent.com/1055125/228841466-de612b81-a2fe-4e5a-9535-1a0a29eec062.png">

At this point, I think I've illustrated my reservations in many different ways. The summary is that if you want to interpolate, only adjusting lightness, yes, `oklch(1 none none)` will do that. But if you want to interpolate white with blue, `oklch(1 0 none)` will do that. These are two very different interpolations. `white` from any color space, converting to OkLCh, should resolve to `oklch(1 0 none)` during interpolation, not `oklch(1 none none)` as that will not follow the intent.

At this point, I'll let others comment as I'm not sure I can rephrase my point in many other different ways 🙂 .


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


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

Received on Thursday, 30 March 2023 12:58:54 UTC