For the background and explanation of why to add this feature, please see this Color Workshop presentation which has a video presentation, plus associated slides and transcript. You can just skim the slides/transcript if you are pressed for time.
Having done so, and given the rationale presented, the specific proposal is to add OKLab as follows: Edit: items re-ordered so highest priority is first.
CSS Color 4
- in the gamut mapping section, require gamut reduction to use OKLCH chroma reduction and deltaE OK, rather than CIE LCH chroma reduction and deltaE 2000. This is both better and faster. If we don't do this, I am not confident of being able to write a satisfactory gamut mapping section in CSS Color 4. See examples below
- in the interpolation section, for non-legacy color formats, if the host syntax does not specify a colorspace, change
lab to oklab as the default. If we don't do this, color interpolation in gradients, animations and transitions will not be as good, and will sometimes give surprising hue shifts.
- add
oklab() and oklch() (as well as the existing lab() and lch() which are still useful) and add their implementation to the sample code. Not doing this means we have a colorspace of proven usefulness, implemented inside the browser, but we deny users access to it.
CSS Color 5
- add
oklab and oklch as defined color spaces which can be used in color-mix(). Depends on 3.
- add
oklab() and oklch() to Relative Color Syntax. Depends on 3.
@argyleink @una @tabatkins @LeaVerou
For the background and explanation of why to add this feature, please see this Color Workshop presentation which has a video presentation, plus associated slides and transcript. You can just skim the slides/transcript if you are pressed for time.
Having done so, and given the rationale presented, the specific proposal is to add OKLab as follows: Edit: items re-ordered so highest priority is first.
CSS Color 4
labtooklabas the default. If we don't do this, color interpolation in gradients, animations and transitions will not be as good, and will sometimes give surprising hue shifts.oklab()andoklch()(as well as the existinglab()andlch()which are still useful) and add their implementation to the sample code. Not doing this means we have a colorspace of proven usefulness, implemented inside the browser, but we deny users access to it.CSS Color 5
oklabandoklchas defined color spaces which can be used incolor-mix(). Depends on 3.oklab()andoklch()to Relative Color Syntax. Depends on 3.@argyleink @una @tabatkins @LeaVerou