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

If Tab is saying that values scaled, in external specs, from 0.0 to 1.0 or 0 to 100 should, in CSS,  preferably be expressed as `<percentage>`, I wholeheartedly agree. 

Alternative suggestion to renaming `lab()` and `lch()`: Ditch `color()` in favor of established functional notations with known parameters and introduce the (now optional) colorspace identifier to them:

~~~~ abnf 
// <ident> defaults to "srgb":

rgb( [<colorspace>,]? <channel> <channel> <channel> [/ <opacity>]? )

hsl( [<colorspace>,]? <hue> <saturation> <lightness> [/ <opacity>]? )

hwb( [<colorspace>,]? <hue> <channel> <channel> [/ <opacity>]? )

// <ident> defaults to either "cie1976" or "ok"

lab( [<colorspace>,]? <lightness> <number> <number> [/ <opacity>]? )

lch( [<colorspace>,]? <lightness> <chroma> <hue> [/ <opacity>]? )

// components

<colorspace> = <ident> | <dashed-ident>
<channel>    = <percentage> | <integer[0, 255]>
<hue>        = <angle> | <number[0, 360]>
<saturation>, 
<chroma>     = <percentage>
<lightness>  = <percentage> | <number[0, 100]>
<opacity>    = <percentage> | <number[0.0, 1.0]>
~~~~

-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-936944553 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 19:16:11 UTC