mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
6482a036cb
# Objective - Fixes #13214 ## Solution Delegates to internal type when possible, otherwise uses `ChosenColorSpace` as an intermediary. This _will_ double convert, but this is considered an acceptable compromise since use of specific colour types in performance critical colour operations is already encouraged. `ChosenColorSpace` is `Oklcha` since it's perceptually uniform while supporting all required operations, and in my opinion is the "best" for this task. Using different spaces for different operations will make documenting this double-conversion behaviour more challenging. ## Testing Changes straightforward enough to not require testing beyond current CI in my opinion. --- ## Changelog - Implemented the following traits for `Color`: - `Luminance` - `Hue` - `Mix` - `EuclideanDistance` - `ClampColor` - Added documentation to `Color` explaining the behaviour of these operations (possible conversion, etc.) |
||
---|---|---|
.. | ||
crates/gen_tests | ||
docs | ||
src | ||
Cargo.toml | ||
README.md |