Skip to content

Conversation

@tomcur
Copy link
Member

@tomcur tomcur commented Jan 10, 2025

This is a mostly mechanical translation from the reference implementation provided by Björn Ottosson.

I've not done a deep dive into the math. This just differs by a few optimizations.

Note: the conversion into and out of this color space are approximations due to compute_max_srgb_saturation. The other picker, Okhsl, would share most of this code.

This is a mostly mechanical translation from the
[reference implementation provided by Björn Ottosson](https://github.com/bottosson/bottosson.github.io/blob/f6f08b7fde9436be1f20f66cebbc739d660898fd/misc/ok_color.h).

I've not done a deep dive into the math. This just differs by a few
optimizations.

Note: the conversion into and out of this color space are approximations
due to `compute_max_srgb_saturation`. The other picker, `Okhsl`, would
share most of this code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants