Skip to main content

Function: linearSrgbToOklab()

linearSrgbToOklab(r, g, b): Oklab

Converts linear sRGB values to Oklab color space.

Parameters

ParameterTypeDescription
rnumberThe red channel of linear sRGB (0-1).
gnumberThe green channel of linear sRGB (0-1).
bnumberThe blue channel of linear sRGB (0-1).

Returns

Oklab

An object with L, a, and b properties in Oklab color space.

Defined in

conversions/components/oklab-linear-srgb.ts:34