ColorValue
Defined in: packages/core/src/fields/color/convert.ts:16
A colour in 8-bit sRGB with straight (non-premultiplied) alpha.
This is the pivot representation for every notation: parsing produces one,
serialising consumes one. sRGB rather than HSV because HSV is a picker’s
working model — @uiw/react-color-sketch happens to use it — while sRGB is
what every CSS notation converts to and from.
Example
Section titled “Example”const ember: ColorValue = { r: 232, g: 98, b: 42, a: 1 };Properties
Section titled “Properties”a:
number
Defined in: packages/core/src/fields/color/convert.ts:24
Alpha, 0–1. 1 is fully opaque.
b:
number
Defined in: packages/core/src/fields/color/convert.ts:22
Blue channel, 0–255.
g:
number
Defined in: packages/core/src/fields/color/convert.ts:20
Green channel, 0–255.
r:
number
Defined in: packages/core/src/fields/color/convert.ts:18
Red channel, 0–255.