mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
4d325eb3f0
# Objective - Improve compatibility with CSS Module 4 - Simplify `Lcha` conversion functions ## Solution - Added `Laba` which implements the Lab color model. - Updated `Color` and `LegacyColor` accordingly. ## Migration Guide - Convert `Laba` to either `Xyza` or `Lcha` using the provided `From` implementations and then handle accordingly. ## Notes The Lab color space is a required stepping stone when converting between XYZ and Lch, therefore we already use the Lab color model, just in an nameless fashion prone to errors. This PR also includes a slightly broader refactor of the `From` implementations between the various colour spaces to better reflect the graph of definitions. My goal was to keep domain specific knowledge of each colour space contained to their respective files (e.g., the `From<Oklaba> for LinearRgba` definition was in `linear_rgba.rs` when it probably belongs in `oklaba.rs`, since Linear sRGB is a fundamental space and Oklab is defined in its relation to it) |
||
---|---|---|
.. | ||
crates/gen_tests | ||
src | ||
Cargo.toml |