bevy/crates
Zachary Harrold 4d325eb3f0
bevy_color: Add Laba to support Lab Color Model (#12115)
# 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)
2024-02-26 22:30:50 +00:00
..
bevy_a11y Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_animation Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_app Use immutable key for HashMap and HashSet (#12086) 2024-02-26 16:27:40 +00:00
bevy_asset Add to_bits and from_bits functions to AssetIndex (#12127) 2024-02-26 21:02:26 +00:00
bevy_audio Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_color bevy_color: Add Laba to support Lab Color Model (#12115) 2024-02-26 22:30:50 +00:00
bevy_core Check cfg during CI and fix feature typos (#12103) 2024-02-25 15:19:27 +00:00
bevy_core_pipeline Port bevy_core_pipeline to LinearRgba (#12116) 2024-02-26 12:25:11 +00:00
bevy_derive Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_diagnostic Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_dylib Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_dynamic_plugin Document all members of bevy_dynamic_plugin (#12029) 2024-02-22 13:28:52 +00:00
bevy_ecs Fix typos (#12131) 2024-02-26 17:46:01 +00:00
bevy_ecs_compile_fail_tests Remove APIs deprecated in 0.13 (#11974) 2024-02-19 19:04:47 +00:00
bevy_encase_derive Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_gilrs Make Gilrs a normal resource on non-Wasm targets (#12092) 2024-02-26 00:23:42 +00:00
bevy_gizmos Fix typos (#12131) 2024-02-26 17:46:01 +00:00
bevy_gltf Use immutable key for HashMap and HashSet (#12086) 2024-02-26 16:27:40 +00:00
bevy_hierarchy Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_input Fix missing renaming of Input -> ButtonInput (#12096) 2024-02-24 18:41:17 +00:00
bevy_internal Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
bevy_log Remove unnecessary wildcards from LogPlugin and convert warnings to errors. (#12046) 2024-02-23 18:49:32 +00:00
bevy_macro_utils fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Add Direction3dA and move direction types out of primitives (#12018) 2024-02-26 13:57:49 +00:00
bevy_mikktspace fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_pbr Add random shader utils, fix cluster_debug_visualization (#11956) 2024-02-26 15:59:44 +00:00
bevy_ptr Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_reflect Added reflect support for std::HashSet, BTreeSet and BTreeMap. (#12124) 2024-02-26 16:36:04 +00:00
bevy_reflect_compile_fail_tests bevy_reflect_derive: Clean up attribute logic (#11777) 2024-02-12 15:16:27 +00:00
bevy_render bevy_color: Add Laba to support Lab Color Model (#12115) 2024-02-26 22:30:50 +00:00
bevy_scene Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_sprite Prefer UVec2 when working with texture dimensions (#11698) 2024-02-25 15:23:04 +00:00
bevy_tasks Loosen lifetime requirements for single-threaded Scope::spawn to match the multi-threaded version. (#12073) 2024-02-24 06:01:34 +00:00
bevy_text Prefer UVec2 when working with texture dimensions (#11698) 2024-02-25 15:23:04 +00:00
bevy_time Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_transform Add Direction3dA and move direction types out of primitives (#12018) 2024-02-26 13:57:49 +00:00
bevy_ui Prefer UVec2 when working with texture dimensions (#11698) 2024-02-25 15:23:04 +00:00
bevy_utils fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_window Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_winit Check cfg during CI and fix feature typos (#12103) 2024-02-25 15:19:27 +00:00