srgbToLinear

external fun srgbToLinear(value: Double): Double(source)

Converts the value from sRGB color space to linear color space.

const srgbColor = [0.5, 0.5, 0.5];
const linearColor = srgbColor.map(function (c) {
return srgbToLinear(c);
});

Return

Returns the color value in linear color space.

Parameters

value

The color value in sRGB color space.

See also