CSS color module level 5 color space support
Ogeon opened this issue · 0 comments
Ogeon commented
Description
CSS has a few variants of color spaces that aren't yet supported in Palette. These should be added.
XYZ:
-
xyz
,xyz-d65
-Xyz
or explicitlyXyz<D65>
-
xyz-d50
-Xyz<D50>
RGB:
- Hex color -
Srgb::<u8>::from_str
- Named color -
palette::named
-
rgb()
andrgba()
-Srgb
,Srgba
-
srgb
-Rgb
,Srgb
or explicitlyRgb<Srgb>
-
srgb-linear
-LinSrgb
-
display-p3
- Separate issue: #367, implemented in #412 -
a98-rgb
- Implemented in #411 -
prophoto-rgb
- Implemented in #413 -
rec2020
- Implemented in #410
Other:
-
hsl()
andhsla()
-Hsl<Srgb>
,Hsla<Srgb>
-
hwb()
-Hwb<Srgb>
-
lab()
-Lab<D50>
-
lch()
-Lch<D50>
-
oklab()
-Oklab
-
oklch()
-Oklch
-
device-cmyk
(naive or value container) - Separate issue: #6
https://www.w3.org/TR/css-color-5
Motivation
CSS is widely used and providing matching options makes it easier for applications to use Palette as the color management backend when reading and writing CSS color syntax.