forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RAINBOW EFFECT] Added methods to get HSL components from Color (bevy…
…engine#9201) # 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)
- Loading branch information
Showing
1 changed file
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters