mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
bcd5318247
`Color` can now be from different color spaces or representation: - sRGB - linear RGB - HSL This fixes #1193 by allowing the creation of const colors of all types, and writing it to the linear RGB color space for rendering. I went with an enum after trying with two different types (`Color` and `LinearColor`) to be able to use the different variants in all place where a `Color` is expected. I also added the HLS representation because: - I like it - it's useful for some case, see example `contributors`: I can just change the saturation and lightness while keeping the hue of the color - I think adding another variant not using `red`, `green`, `blue` makes it clearer there are differences Co-authored-by: Carter Anderson <mcanders1@gmail.com> |
||
---|---|---|
.. | ||
button.rs | ||
font_atlas_debug.rs | ||
text.rs | ||
text_debug.rs | ||
ui.rs |