Re: [csswg-drafts] [css-color] Add OKLab, OKLCH (#6642)

I have been debating this with myself for a good while, hence the lack of comment.

I *did* watch @svgeesus' talk (and I *really* recommend watching it to anyone who wants to have an opinion on this), and I do agree there are significant advantages in Oklab over Lab. However, Lab has been established for 45 years. It has a ton of tooling around it. It has drawbacks, yes, but those are widely studied. Same as all the color formats currently in CSS, they all have drawbacks, but are all old and established, and their drawbacks studied and known. Oklab on the other hand is very new. It has not yet been fully explored, and it has almost no tooling that supports it. Its advantages are known, but its drawbacks are still being researched. It seems a little premature to add it to CSS, especially as a named function.

As a secondary point, we need to decide when we add things as a named function and when as a `color()` keyword. Right now we have both, and some color spaces can only be expressed via `color()` and others via named functions. From an author point of view, the distinction is unclear. The [spec](https://drafts.csswg.org/css-color-4/#icc-colors) lists `color()` as "Profiled, device dependent colors". Does that mean that any color space we add with a restricted gamut is under `color()` and anything else is not? 

I disagree that authors will always reach for the shortest syntax. Firstly, a lot of the time colors are reused via variables, not re-specified. Secondly, if that were true, `#RGB` would be the most popular color syntax, which is not the case.

One issue with Oklab is that it uses different coordinates than Lab, namely 0-1 ranges instead of 0-100. If we do add such a syntax in CSS, I wonder if there is value in trying to harmonize the two a little.

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


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

Received on Wednesday, 6 October 2021 11:19:47 UTC