Open svgeesus opened 3 years ago
In addition, the interpolation section of CSS Color 5 needs to define how premultiplied alpha is handled.
It now defines handling for premultiplied alpha.
I also added premultiplied alpha support to color.js, to allow playing around with gradients in various interpolation spaces.
Tagging Images 4 for fixing; I'm aware that currently, Images 4 has the same gradient stuff as Images 3.
Two things in the CSS Images definition of gradients hinder integration with CSS Color 4:
The
<<color>>
token links to CSS Color 3, which only allows sRGB values. CSS Color 4, which is the current work, allows other RGB spaces, CMYK, Lab, and LCH.the section coloring the gradient line says that
which would force all colors to be
a) converted to sRGB, resulting in gamut mapping b) interpolated in sRGB gamma-encoded space.
Suggested fixes are
<<color>>
to CSS Color 4, which is the current specificationIn addition, the interpolation section of CSS Color 5 needs to define how premultiplied alpha is handled. For example in Lab or in XYZ, premultiplying all three component values will work; in LCH, premultiplying hue would change the hue so should not be done.
I'm happy to help with examples (CSS, color calculations, rendered results) of interpolated gradient lines which involve non-sRGB stops.
@tabatkins @fantasai @LeaVerou