Writes a colour back as a string the engine accepts.
Ordinary colours become hex, or rgba() once alpha is involved, because that is how this
library's props are written everywhere else and it stays readable.
A colour outside sRGB cannot be written either way — hex has no room for a channel above 255 or
below 0 — so it becomes color(srgb …), which carries the extended values verbatim and is read
back exactly. Clamping instead would substitute a duller colour without saying so.
Writes a colour back as a string the engine accepts.
Ordinary colours become hex, or
rgba()once alpha is involved, because that is how this library's props are written everywhere else and it stays readable.A colour outside sRGB cannot be written either way — hex has no room for a channel above 255 or below 0 — so it becomes
color(srgb …), which carries the extended values verbatim and is read back exactly. Clamping instead would substitute a duller colour without saying so.