To any would-be implementors of oklab and oklch, I highly recommend only working from the w3c's CSS4 color specification, and ignore everything else. The spec has a lot of important information that the original oklab blog post glosses over, the spec walks you through actually implementing it, and the standardized version uses a different white point.
Also it's worth noting that MDN's information on oklab is straight up wrong, and firefox doesn't correctly implement the "powerless" cases. ๐
you can also just copy my implementation (with the caveat that I haven't tested it exhaustively), but I still recommend familiarizing yourself with the CSS4 color spec as it explains the theory involved
https://github.com/Aeva/tangerine/blob/excelsior/tangerine/colors.h
https://github.com/Aeva/tangerine/blob/excelsior/tangerine/colors.cpp
Should any of you have seen this thread earlier today, and thought "gee, I really wish Aeva would make that demo interactive and toss it up on her itch.io page on a whim, then I could experience oklch color in full oklch color to my heart's content", WELL I HAVE GREAT NEWS FOR YOU BECAUSE I DID EXACTLY THAT:
Very nice. After playing with it a bit, I have a question though:
Can we ever truly debug normals? Really normal normals? I have my doubts.
But seriously, it's a neat toy, and while I haven't quite figured out what clicks do in different contexts, it does come up with some interesting and fairly harmonious color palettes.