Re: [csswg-drafts] [css-color-4] L as `<percentage>` in `lab()` and `oklab()` (#6761)

> oklch(86.6% 29.1 142.1)
oklch(86.6% 29.1% 142.1)
oklch(86.6% 41.15 142.1)
oklch(86.6% 0.291 142.1)

> Currently, for CSS Color 4 the last of those is correct. The chance that people mess this up in one way or another and end up with an off-by-100 error when simply copying colors into CSS is large.

I literally just made that mistake (again) when adding the section on resolving OKLab and OKLCH values.

> The only real downside of using a percentage here in my mind is if it trips users up when pasting in component values from another tool

Yes, this is exactly my concern

> (say, something like https://colorjs.io/apps/convert/?color=lime&precision=4 which uses the unit notation).

That tool can be and should be updated, because it primarily tracks CSS and other Web Platform rather than color in general. But other tools will _present OKLab values as defined in the OKLab specification_ which frankly should not surprise anyone.

> One concrete thing you might want to consider is updating the sample code to call out this difference.

Good idea.

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


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

Received on Monday, 29 November 2021 11:33:11 UTC