-
Notifications
You must be signed in to change notification settings - Fork 330
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 migration guide #1379
Color migration guide #1379
Conversation
Note to self: this should include migrations for bevyengine/bevy#12163, bevyengine/bevy#12079, bevyengine/bevy#12105, bevyengine/bevy#12116, bevyengine/bevy#12114, bevyengine/bevy#12115, bevyengine/bevy#12168, bevyengine/bevy#12583, and bevyengine/bevy#12399. |
- `Color::set_a` and `Color::a` is now `Color::set_alpha` and `Color::alpha`. These are part of the `Alpha` trait in `bevy_color`. | ||
- `Color::is_fully_transparent` is now part of the `Alpha` trait in `bevy_color` | ||
- `Color::r`, `Color::set_r`, `Color::with_r` and the equivalents for `g`, `b` `h`, `s` and `l` have been removed due to causing silent relatively expensive conversions. Convert your `Color` into the desired color space, perform your operations there, and then convert it back into a polymorphic `Color` enum. | ||
- `Color::hex` is now `Srgba::hex`. Call `.into` or construct a `Color::Srgba` variant manually to convert it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or .to_srgba()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What section are you referring to for this? You commented on removed text that no longer exists, so I'm not sure what you're talking about.
Originally part of #1376, but I split it out due to the amount of content.
This is the draft migration guide for the new color module. Please review it, re-organize it, and correct it as much as you like!