A pragmatic set of modern colour space transforms for the Odin language

4 points by heavyrain266


Aks

Awesome, hope this gets vendored in

heavyrain266

Author here, started this out of the need for CSS-style oklch() in my UI framework and frustration with CSS Color Module 4's gamut mapping, which shifts P3 blues to purple on sRGB displays. All transforms use pre-computed matrices with Odin's distinct types catching space mismatches at compile time. Gamut mapping following Björn Ottosson's cusp-projection approach is in progress.