superhighfives / pika

An open-source colour picker app for macOS
https://superhighfives.com/pika
MIT License
1.71k stars 55 forks source link

Add OKLCH color format #105

Open bkuhlmann opened 1 year ago

bkuhlmann commented 1 year ago

Is your feature request related to a problem? Please describe.

Hello. :wave: Would it be possible to add oklch color support? Here's a few supporting articles:

Describe the solution you'd like

It would be nice to see this as a toggle along with the other colors that are supported. Example:

2023-07-15_08-01-23-Sublime Text

Describe alternatives you've considered

Other than manually doing the conversion yourself, I'm not sure there is a good alternative for the moment.

superhighfives commented 1 year ago

Oooh, this would be great—thanks for taking the time to share, @bkuhlmann, and for the links to supporting articles.

The main things I'd need to do is work out the the math to convert to and from that format in Swift (taking into consideration that it looks like it's possible for it to return colours outside sRGB). On my list to take a look, but I don't have a firm timeline in mind. 😊

mortyccp commented 7 months ago

Maybe you can checkout this library https://github.com/importRyan/Oklab

superhighfives commented 7 months ago

Thanks for sharing, @mortyccp! Can take a look. If anyone else stumbles on this issue and wants to take a pass, I'd love to check out a PR too.