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

>  why we'd want to add these in addition to the existing lab()/lch(), rather than just changing those functions to use the OKLab space? Is there a good reason to keep the existing Lab functions?

Good question, and the main reason I suggest keeping them around is because there is lots of hardware (instrumentation, like spectrophotometers) and software which generates Lab (or LCH, or both) values.  The secondary reason is that Lab and LCH have decades of user experience with them, while OKLab/OKLCH have less than a year.

So:

- to _specify_ a color, people can continue to use `lab()` and `lch()` because that is convenient for them. They can read out a value from Photoshop or Krita or whatever and use it directly. In much the same way they can continue to use `a98rgb()` despite `display-p3` being a more popular choice nowadays. 
- for general interpolation, if the host syntax doesn't specify, then the default changes from `Lab` to `oklab` because that will generally give better results; but you can still get `lab` if you want it, by specifying explicitly. 
- for gamut mapping, we just go straight to `oklch` because it is strictly better.

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


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

Received on Tuesday, 28 September 2021 15:53:09 UTC