-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
188: Allow HSV, HSL and HWB to represent nonlinear RGB r=Ogeon a=Ogeon This removes the old restriction that meant HSV, HSL and HWB can only represent linear RGB. They can now be converted to and from RGB (and each other) as long as the RGB standard is the same. This restriction is there to still allow type inference and reduce implementation complexity. So converting `Hsl<Srgb>` (not linear) to `Rgb<Srgb>` is still a single step process, while converting to `Rgb<Linear<Srgb>>` is a two step process. There are still shortcuts in place to only change the RGB standard, meaning it's possible to write `Hsl::<Linear<Srgb>>::from_color(Hsl::<Srgb>::new(...))`, similar to how it worked before. This will mean that existing code may have a different output, adding more breaking changes to the pile. Fixes #160, fixes #187 Co-authored-by: Erik Hedvall <erikwhedvall@gmail.com>
- Loading branch information
Showing
14 changed files
with
437 additions
and
408 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
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.