OKLAB is a color space that tries to match human perception closer than sRGB. You can read about it here. Some of this code is taken from that site.
When I started working on this, I was under the impression that there wasn't an oklch-based color picker. Now I think that you should probably just use this one instead of mine (for now).
Some known issues:
- I'm bad at CSS, so this widget doesn't look great in general. I'm working on it I swear.
- Currently I don't gracefully handle the part of the color space where RGB can't render it properly. On the "bright" end of chromaticity and luminosity, this means you don't get a correct or even correct-looking color.
- The RGB conversion is currently giving you what the RGB color "would be", for the actual values of LCH given. I haven't gotten it to show the actual rendered color yet.