encodeRGB8

external fun encodeRGB8(color: Color): Double(source)

Encodes RGB values at 8-bit precision into a single float, equivalent to 0xFFFFFF representation in JavaScript. Perceptually near-lossless in the "srgb" color space; "srgb-linear" and wide-gamut color spaces benefit from 10+ bit precision.

See also