Skip to content

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.

const ember: ColorValue = { r: 232, g: 98, b: 42, a: 1 };

a: number

Defined in: packages/core/src/fields/color/convert.ts:24

Alpha, 01. 1 is fully opaque.


b: number

Defined in: packages/core/src/fields/color/convert.ts:22

Blue channel, 0255.


g: number

Defined in: packages/core/src/fields/color/convert.ts:20

Green channel, 0255.


r: number

Defined in: packages/core/src/fields/color/convert.ts:18

Red channel, 0255.