-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Lab and Lch color spaces #22
Conversation
Adds the colorspaces and associated logic. Also fix `map_lightness` implementations, I had forgotten that these don't have the same bounds as Oklab and Oklch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, but after that …
Mostly doc fixes.
color/src/color.rs
Outdated
@@ -202,14 +202,17 @@ impl<CS: ColorSpace> OpaqueColor<CS> { | |||
/// | |||
/// In a color space that naturally has a lightness component, map that value. | |||
/// Otherwise, do the mapping in Oklab. The lightness range is normalized so | |||
/// that 1.0 is white. | |||
/// that 1.0 is white. That is the normal range for Oklab but differs from the | |||
/// range in Lab, Lch, and HSL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but can these be links?
color/src/color.rs
Outdated
@@ -298,14 +301,17 @@ impl<CS: ColorSpace> AlphaColor<CS> { | |||
/// | |||
/// In a color space that naturally has a lightness component, map that value. | |||
/// Otherwise, do the mapping in Oklab. The lightness range is normalized so | |||
/// that 1.0 is white. | |||
/// that 1.0 is white. That is the normal range for Oklab but differs from the | |||
/// range in Lab, Lch, and HSL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links here too?
Since we don't have the HSL color space yet, I linked the relevant spec section. That's a minor cleanup for when we do add HSL.
Adds the colorspaces and associated logic.
Also fix
map_lightness
implementations, I had forgotten that these don't have the same bounds as Oklab and Oklch.