bevy/crates/bevy_color
Zachary Harrold f939c09f2c
bevy_color: Added Hsva and Hwba Models (#12114)
# Objective

- Improve compatibility with CSS Module 4
- Simplify `Hsla` conversion functions

## Solution

- Added `Hsva` which implements the HSV color model.
- Added `Hwba` which implements the HWB color model.
- Updated `Color` and `LegacyColor` accordingly.

## Migration Guide

- Convert `Hsva` / `Hwba` to either `Hsla` or `Srgba` using the provided
`From` implementations and then handle accordingly.

## Notes

While the HSL color space is older than HWB, the formulation for HWB is
more directly related to RGB. Likewise, HSV is more closely related to
HWB than HSL. This makes the conversion of HSL to/from RGB more
naturally represented as the compound operation HSL <-> HSV <-> HWB <->
RGB. All `From` implementations for HSL, HSV, and HWB have been designed
to take the shortest path between itself and the target space.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-02-26 12:25:49 +00:00
..
crates/gen_tests bevy_color: Added Hsva and Hwba Models (#12114) 2024-02-26 12:25:49 +00:00
src bevy_color: Added Hsva and Hwba Models (#12114) 2024-02-26 12:25:49 +00:00
Cargo.toml Port bevy_core_pipeline to LinearRgba (#12116) 2024-02-26 12:25:11 +00:00