Open
Description
@LeaVerou said in the context of preserving none
in color space conversion:
If all components in the source color (except alpha) are
none
, then they remainnone
. (oklch(none none none / 0%)
is liketransparent
on steroids)
I like this, I think it is useful.
It allows authors to get the full color of one side of an interpolation without knowing anything about that color.
Example:
.foo {
color: color-mix(in oklab, var(--color-a), pink);
}
.bar {
--color-a: rgb(none none none);
}
The author might not know what the other color or interpolation space is.
Setting a color with all channels to none
creates a reliable way to get that pink
.
I can even imagine a keyword for this: opaque
which has a value of rgb(none none none / 100%)