rgbToOklab
rgbToOklab(
inputColor):Node<"vec4">
Defined in: packages/nodes/src/color/oklab.ts:132
Convert sRGB (gamma-encoded) color to OKLAB.
Applies the exact IEC 61966-2-1 sRGB->linear transfer (sRGBTransferEOTF)
first. Input rgb is clamped to [0,1] — display sRGB is bounded by definition
and this avoids pow-on-negative undefined behavior.
Parameters
Section titled “Parameters”inputColor
Section titled “inputColor”Node <"vec4">
sRGB color (vec4, alpha preserved)
Returns
Section titled “Returns”Node <"vec4">
vec4(L, a, b, alpha)
Example
Section titled “Example”rgbToOklab(texture(tex, uv()))