Converts a linear-light sRGB color to Oklab: x is lightness (0 for black, about 1 for white), y and z the green-red and blue-yellow axes. The input must be linear, not gamma-encoded; see Srgb.srgb_to_linear. The transform runs in float64 and rounds to float at the end.
#import "Math";
white := linear_srgb_to_oklab(xyz(1, 1, 1));
assert(abs(white.x - 1) < 0.001 && abs(white.y) < 0.001 && abs(white.z) < 0.001);linear_srgb_to_oklab :: (c: Vector3) -> Vector3
Parameters
- c: Vector3