Devographics / surveys

YAML config files for the Devographics surveys
44 stars 8 forks source link

Feature: Wide gamut colors #3

Closed LeaVerou closed 1 year ago

LeaVerou commented 2 years ago

Wide gamut colors are lab(), lch(), oklab(), oklch() and the color() function

Or should we ask about device independent colors (lab(), lch(), oklab(), oklch()) and wide gamut colors (color()) separately?

(split off from #1 and #2)

ai commented 2 years ago

I think we should ask about them. People already started to use them https://github.com/search?q=oklch&type=code

But I suggests calling the item oklch(), lch(), lab(), or oklab() color function since wide gamut is only one of the feature.

Maybe we should have another option of using Wide gamut colors (P3)?

SachaG commented 1 year ago

@LeaVerou re: your email

Since "Wide Gamut Colors" doesn't include color() (which has its own question), I'd change that title to "Device Independent Colors". Then you can use "Wide Gamut Color" as a title for the color() question (including the inline code for color() as well of course)

I have to confess it's not clear to me how all these features relate to one another. color() is for specifying a color space, but it's not necessarily a wide gamut color space right?

And are lch(), lab(), etc. wide gamut color spaces or device independent colors? Or both?

LeaVerou commented 1 year ago

color() is for specifying a color in one of the predefined color spaces, not for specifying a color space (there's @color-space for that, but it's too early to ask about that now). All predefined color spaces are "wide gamut" (i.e. wider than sRGB).

Lab/LCh and OKLab/OKLCh are device independent color spaces. They are not tied to a particular gamut, their gamut is essentially infinite (though in practice it's tied to the spectral locus, i.e. the spectrum of color visible to the human eye), so it's weird to refer to them as "wide gamut", even though infinite is trivially wider than sRGB.

That said, srgb is also allowed in color(). There's also XYZ, which is device independent and is specified through color(). However, in practice most people that know of/use color() use it with color spaces like display-p3 or rec2020.