Color_Interpolation module

oklab_to_linear_srgb

procedure · 1 overloadSource

Converts an Oklab color back to linear-light sRGB. Colors outside the sRGB gamut are clamped into [0, 1] per channel (a simple clip, not a gamut mapping), so a round trip of an out-of-gamut Oklab color does not return it.

ExampleOpen in playground ↗
#import "Math";
c := oklab_to_linear_srgb(linear_srgb_to_oklab(xyz(0.2, 0.5, 0.8)));
assert(abs(c.x - 0.2) < 0.001 && abs(c.y - 0.5) < 0.001 && abs(c.z - 0.8) < 0.001);
oklab_to_linear_srgb :: (c: Vector3) -> Vector3

Parameters

Returns

See also