Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
225: `Hsluv` implementation r=Ogeon a=masonium Round three! This finally implements the HSLuv color space as `Hsluv`. A few notes. - I didn't implement Uniform generation for `Hsluv` because I wasn't convinced that the naive version would be anything close to correct. I think you could do something like rejection sample in `Lchuv` (based on if, after converting that to Xyz, it were in-gamut) and then convert the result to `Hsluv`, but that's a very different approach than anything I see currently implemented. - I also added macros for implementing `core::ops::Add` and related traits, since they're pretty repetitive. I also added tests to confirm that all of the arithmetic operations are implemented (though there is no correctness checking). - I kept `l` as the field name, rather than `lightness`, since it is the same as the `Lchuv` `l`. Closes #112 Co-authored-by: Mason Smith <masonium@gmail.com>
- Loading branch information
Showing
11 changed files
with
1,153 additions
and
260 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
Oops, something went wrong.