Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why is there no documented formula to convert to from this color space? A quick google and the best I could find is this Gist[0]. Searching for Oklab has a Wikipedia page[1].

[0] https://gist.github.com/dkaraush/65d19d61396f5f3cd8ba7d1b4b3...

[1] https://en.wikipedia.org/wiki/Oklab_color_space



It looks to me that all the "magic" is in the matrices used for conversion between Oklab and sRGB. The final conversion between Oklab and Oklch is trivial, and is documented in your linked Wikipedia article.


OKLCh is the same space as OKLab, it's just polar coordinates versus rectangular coordinates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: