Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Okhsl and Okhsv support for bevy_color #17650

Open
realhackcraft opened this issue Feb 2, 2025 · 0 comments
Open

Okhsl and Okhsv support for bevy_color #17650

realhackcraft opened this issue Feb 2, 2025 · 0 comments
Labels
C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled

Comments

@realhackcraft
Copy link

What problem does this solve or what need does it fill?

Okhsl is better than oklch at randomly generating hues while keeping other conditions equal, as it is cylindrical and therefore allows more saturation without overflowing, which is an issue with oklch.

What solution would you like?

Add okhsl and okhsv to the bevy_colors.

What alternative(s) have you considered?

  1. Deal with less saturated colors
  2. Use math on my side to calculate the highest chroma for a given hue

Additional context

C++ code can be found here: https://bottosson.github.io/posts/colorpicker/

I could try implementing this for myself, but I'm new to the codebase and don't really know how to compute some values of the traits.

@realhackcraft realhackcraft added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

1 participant