I finally fixed Tangerine's oklab color implementation last night, and then went and also implemented oklch and hsl. I really like oklch! It feels like I magically unlocked a bunch of new colors. It's really powerful for generating color pallets.

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

tangerine/tangerine/colors.h at excelsior ยท Aeva/tangerine

๐ŸŠ. Contribute to Aeva/tangerine development by creating an account on GitHub.

GitHub
I meant to post a picture of this earlier, but here's a demo of the new oklch support I added to #TangerineCSG last night. I've always found building color pallets to be clumsy and disappointing, so I'm really excited to now have something that's pretty good at transforming individual colors into sets of colors that compose well.
For the sake of comparison, here's the exact same demo but in hsl space instead of oklch. See alt text notes for both.
I think my main takeaway here is that, as a tool that a human interacts with directly, sRGB and hsl are alright for good for picking out specific saturated colors. I think oklab and oklch aren't as useful for that purpose, but oklab is really good at giving you a nice spectrum of color between two points, and oklch is really good at mutating colors into different colors that have similar behaviors.

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:

https://aeva.itch.io/lchooq

L. C. H. O. O. Q. by Aeva

Explore oklch color space!

itch.io

@aeva

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.

@aeva

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.

@CliftonR :D awesome!
@CliftonR would you like an explanation of the clicks, or would that be a spoiler :3