bevy/crates/bevy_color
Daniel Miller 1d29f8e6f6
Added a Grey trait, and implementations on baked-in colors. Fixes #13206 (#13237)
Added a Grey trait to allow colors to create a generic "grey" color.

This currently assumes the color spaces follow the same gradient, which
I'm pretty sure isn't true, but it should make a "grey-ish" color
relative to the provided intensity.

# Objective

- Implements #13206 

## Solution

- A small `Grey` trait was added and implemented for the common color
kinds.

## Testing

- Currently untested, unit tests exposed the non-linear relation between
colors. I am debating adding an example to show this, as I have no idea
what color space represents what relation of grey, and I figure others
may be similarly confused.

## Changelog

- The `Grey` trait was added, and the corresponding `grey` 

## BREAKING CHANGES

The const qualifier for LinearRGBA::gray was removed (the symbol still
exists via a trait, it's just not const anymore)
2024-05-26 12:53:50 +00:00
..
crates/gen_tests bevy_color: Add Oklch Color Space (#12168) 2024-02-28 01:22:55 +00:00
docs bevy_color: Added Color Conversion Mermaid Diagram (#12147) 2024-02-27 06:03:34 +00:00
src Added a Grey trait, and implementations on baked-in colors. Fixes #13206 (#13237) 2024-05-26 12:53:50 +00:00
Cargo.toml Determine msrv for every standalone bevy_* crate. (#13211) 2024-05-13 18:26:41 +00:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Color

License Crates.io Downloads Docs Discord