forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# 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 <[email protected]>
- Loading branch information
1 parent
8ec6552
commit f939c09
Showing
8 changed files
with
672 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.