-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Use palette crate for color handeling (color spaces and conversions) #1146
Description
What problem does this solve or what need does it fill?
Most libraries which do some kind of rendering (which bevy surely does) are in need of having different color types, color spaces and color conversions to their disposal. Instead of implementing all of these again for bevy, I'd suggest using an already existing crate exactly made for this purpose.
I'm talking about palette. I'm not the maintainer or a contributor (so far) to this project, but I have been using palette before and enjoyed it's API. The Amethyst game engine also uses palette for handling colors.
Palette provides the following
The color types / spaces Srgb, LinSrgb, Hsv, Hsl, Lab, Lch and conversions between them and manipulation of the colors (saturate, darken, blend etc.). Palette provides a lot more but since I don't understand anything else, I don't dare to mention or describe it here.
Describe the solution would you like?
Drag in palette as a dependency of bevy_render and create some pub use re-exportes and integrate in tightly into bevy_render. Maybe create some PRs in palette to fullfille additional needs of bevy or just write some helpers in bevy_render.
Describe the alternative(s) you've considered?
Use some other library.
Write own color handling in bevy_render.