mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 22:18:33 +00:00
# Objective - Fixes #12068 ## Solution - Split `bevy_render::color::colorspace` across the various space implementations in `bevy_color` as appropriate. - Moved `From` implementations involving `bevy_render::color::LegacyColor` into `bevy_render::color` ## Migration Guide ### `bevy_render::color::colorspace::SrgbColorSpace::<f32>::linear_to_nonlinear_srgb` Use `bevy_color::color::gamma_function_inverse` ### `bevy_render::color::colorspace::SrgbColorSpace::<f32>::nonlinear_to_linear_srgb` Use `bevy_color::color::gamma_function` ### `bevy_render::color::colorspace::SrgbColorSpace::<u8>::linear_to_nonlinear_srgb` Modify the `u8` value to instead be an `f32` (`|x| x as f32 / 255.`), use `bevy_color::color::gamma_function_inverse`, and back again. ### `bevy_render::color::colorspace::SrgbColorSpace::<u8>::nonlinear_to_linear_srgb` Modify the `u8` value to instead be an `f32` (`|x| x as f32 / 255.`), use `bevy_color::color::gamma_function`, and back again. ### `bevy_render::color::colorspace::HslRepresentation::hsl_to_nonlinear_srgb` Use `Hsla`'s implementation of `Into<Srgba>` ### `bevy_render::color::colorspace::HslRepresentation::nonlinear_srgb_to_hsl` Use `Srgba`'s implementation of `Into<Hsla>` ### `bevy_render::color::colorspace::LchRepresentation::lch_to_nonlinear_srgb` Use `Lcha`'s implementation of `Into<Srgba>` ### `bevy_render::color::colorspace::LchRepresentation::nonlinear_srgb_to_lch` Use `Srgba`'s implementation of `Into<Lcha>` |
||
---|---|---|
.. | ||
crates/gen_tests | ||
src | ||
Cargo.toml |