mirror of
https://github.com/bevyengine/bevy
synced 2025-01-11 04:38:57 +00:00
af0323a55e
# Changes Added methods to Color enum to retrieve Hue, Saturation and Lightness values. ## Why? As you probably know, to create a color that iterates over the color spectrum (rainbow effect that can be seen on LED keyboards, PC components, etc..), you need to mix the color from Hue, Saturation and Luminosity. Bevy already supports multiple color formats, but provides only 4 methods of retrieving components for RGBA. Nothing like ".get_hue()", so I implemented them with all their variations that RGBA has. Now we can do true rainbow color blending (Example is a button hover effect): [Discord Showcase](https://discord.com/channels/691052431525675048/866787577687310356/1130960862232969400), [Video download](https://cdn.discordapp.com/attachments/866787577687310356/1130960861708697600/HSL_PR.mp4) ![image](https://github.com/bevyengine/bevy/assets/49441831/e8cf4905-2d09-45b3-8e5b-e6203da7fa9c) |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml |