You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-color-hdr] Why do the new non-rgb/xyz colorspaces use the color() function? #11713
Are you saying we should give Jzazbz, JzCzHz and ICtCp their own functions, jzazbz(...), jzczhz(...), and ictcp(...)?
Yes. These are not implemented (well, color.js parses them and emits them, but no-one depends on that). Ant it makes CSS Color HDR align more with CSS Color 4 in terms of color functions.
Or, are you saying we should add color(oklab ...), color(oklch ...), color(lab ...) and color(lch ...)?
(My personal preference would be the latter, deprecating the existing forms, and also adding color(hsl ...) and color(hwb ...) to the party).
That seems like a lot of testing work for little actual benefit (especially if we then deprecate the other forms).
If you are in fact going to add separate functions for Jzazbz, JzCzHz and ICTCP, then please leave out the indices! jab(), jch() and icc() (or perhaps itp()) would work just fine.
In another world, we might have had unified lab() and lch() functions, e.g like lab(… in CIE), lab(… in OK) and lab(… in HDR).
If you are in fact going to add separate functions for Jzazbz, JzCzHz and ICTCP, then please leave out the indices! jab(), jch() and icc() (or perhaps itp()) would work just fine.
Good point, Jzazbz in particular is super hard to say in conversation. And we left out the * in CIE L* a* b*.
On the other hand, there is a separate colorspace called ITP which might be confusing, and icc might be confused with ICC color profiles.
But on balance yes, simple and readable color function names.
Another argument in favor of separating out the non-RGB spaces from color() is RCS. It would be odd to write
color(from var(--base) jzczhz calc(r/2) g calc(b+180)) to halve the lightness and get the complementary hue. These functions should have their own component keywords.
give Jzazbz, JzCzHz and ICtCp their own functions, jzazbz(...), jzczhz(...), and ictcp(...)?
Yes. These are not implemented (well, color.js parses them and emits them, but no-one depends on that). Ant it makes CSS Color HDR align more with CSS Color 4 in terms of color functions.
PROPOSED: In CSS Color HDR, move Jzazbz, JzCzhz and ICtCp from color() to their own functions, for consistency with CSS Color 4 Lab, LCh, Oklab and Oklch
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: In CSS Color HDR, move Jzazbz, JzCzhz and ICtCp from color() to their own functions, for consistency with CSS Color 4 Lab, LCh, Oklab and Oklch
@cdoublev I'm not happy with the grammar productions. The extended <color-function> production links back to CSS Color 5, which means the extended <colorspace-params> becomes invisible. Could you take a look?
Activity
svgeesus commentedon Feb 14, 2025
Fair point, and there is still time to change this if that is what we want.
weinig commentedon Feb 18, 2025
@svgeesus, I can't tell from your response what you are suggesting is still possible to change.
Are you saying we should give Jzazbz, JzCzHz and ICtCp their own functions,
jzazbz(...),jzczhz(...), andictcp(...)?Or, are you saying we should add
color(oklab ...),color(oklch ...),color(lab ...)andcolor(lch ...)?(My personal preference would be the latter, deprecating the existing forms, and also adding
color(hsl ...)andcolor(hwb ...)to the party).svgeesus commentedon Feb 18, 2025
Sorry.
Yes. These are not implemented (well, color.js parses them and emits them, but no-one depends on that). Ant it makes CSS Color HDR align more with CSS Color 4 in terms of color functions.
That seems like a lot of testing work for little actual benefit (especially if we then deprecate the other forms).
Crissov commentedon Feb 18, 2025
If you are in fact going to add separate functions for Jzazbz, JzCzHz and ICTCP, then please leave out the indices!
jab(),jch()andicc()(or perhapsitp()) would work just fine.In another world, we might have had unified
lab()andlch()functions, e.g likelab(… in CIE),lab(… in OK)andlab(… in HDR).svgeesus commentedon Feb 18, 2025
Good point, Jzazbz in particular is super hard to say in conversation. And we left out the
*in CIE L* a* b*.On the other hand, there is a separate colorspace called
ITPwhich might be confusing, andiccmight be confused with ICC color profiles.But on balance yes, simple and readable color function names.
svgeesus commentedon Mar 3, 2025
CIECAM02, CIECAM02-UCS and CAM16-UCS also have
Jabso unpronounceable Jazbee names it is, I think.svgeesus commentedon Mar 3, 2025
Another argument in favor of separating out the non-RGB spaces from
color()is RCS. It would be odd to writecolor(from var(--base) jzczhz calc(r/2) g calc(b+180))to halve the lightness and get the complementary hue. These functions should have their own component keywords.jzczhz(from var(--base) calc(j/2) c calc(h+180))weinig commentedon Mar 4, 2025
We do already have different constants when using the XYZ colorspaces in an RCS color() function.
svgeesus commentedon Mar 12, 2025
@weinig so the best option seems to be
svgeesus commentedon Mar 12, 2025
PROPOSED: In CSS Color HDR, move
Jzazbz,JzCzhzandICtCpfromcolor()to their own functions, for consistency with CSS Color 4Lab,LCh,OklabandOklchsvgeesus commentedon Mar 12, 2025
@astearns suggest the CfC ends before the next HDR breakout in 2 weeks
weinig commentedon Mar 13, 2025
Proposal seems good to me. +1.
astearns commentedon Mar 17, 2025
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: In CSS Color HDR, move
Jzazbz,JzCzhzandICtCpfromcolor()to their own functions, for consistency with CSS Color 4Lab,LCh,OklabandOklch4 remaining items
[css-color-hdr] Added an informative section introducing ICtCp, moved…
[css-color-hdr] Added section introducing Jzazbz and JzCzhz, moved de…
[css-color-hdr] Remove ICtCp, Jzazbz and JzCzhz from color() producti…
[css-color-hdr] Extend color-functions type for ictcp(), jzazbz() and…
svgeesus commentedon Mar 25, 2025
@cdoublev I'm not happy with the grammar productions. The extended <color-function> production links back to CSS Color 5, which means the extended <colorspace-params> becomes invisible. Could you take a look?
svgeesus commentedon Mar 26, 2025
Re-opening as there are still pending edits and WPT to write
[css-color-hdr] Added component keywords for relative ictcp, jzazbz, …
svgeesus commentedon Jul 19, 2025
Closing as spec is up to date.