Skip to content

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.

Node <"vec4">

sRGB color (vec4, alpha preserved)

Node <"vec4">

vec4(L, a, b, alpha)

rgbToOklab(texture(tex, uv()))