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

Color docs should specify acceptable value ranges #17508

Open
thebluefish opened this issue Jan 23, 2025 · 0 comments
Open

Color docs should specify acceptable value ranges #17508

thebluefish opened this issue Jan 23, 2025 · 0 comments
Labels
A-Color Color spaces and color math C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@thebluefish
Copy link
Contributor

thebluefish commented Jan 23, 2025

https://docs.rs/bevy/latest/bevy/prelude/enum.Color.html

Most of the methods to construct a Color accept values in the range [0..1]. A common beginner mistake is assuming the range [0..255]. Hue is typically in the range [0..360]. LABA/LCHA have a Lightness in the range [0..1.5]. I might have missed some exceptions.

These ranges are documented for the color-space structs being constructed by each method, but IMO should be documented in the method, too.

@thebluefish thebluefish added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled labels Jan 23, 2025
@BenjaminBrienen BenjaminBrienen added D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! A-Color Color spaces and color math and removed S-Needs-Triage This issue needs to be labelled labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Color Color spaces and color math C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

No branches or pull requests

2 participants