Convert sRGB to Oklab perceptual color space
Simple Rust implementation of the Oklab color space conversion routines based on the reference implementation in the blog post.
Mixing of colors in the Oklab color space is meant to give more pleasing gradients.
API
use *;
let Oklab = srgb_to_oklab;
let rgb = oklab_to_srgb;
Oklab components are floats. l is ligthness in range 0 to 1 (inclusive), and a/b colors are small numbers that can be negative.