Skip to content

Commit

Permalink
Don't clamp l in hsl
Browse files Browse the repository at this point in the history
  • Loading branch information
raphlinus committed Nov 10, 2024
1 parent 743c0ed commit 84ec91b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion color/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ impl<'a> Parser<'a> {
let comma = self.ch(b',');
let s = self.scaled_component(1., 1.)?.map(|x| x.max(0.));
self.optional_comma(comma)?;
let l = self.scaled_component(1., 1.)?.map(|x| x.clamp(0., 100.));
let l = self.scaled_component(1., 1.)?;
let mut alpha = Some(1.0);
if self.opacity_separator(comma) {
alpha = self.scaled_component(1., 0.01)?.map(|a| a.clamp(0., 1.));
Expand Down

0 comments on commit 84ec91b

Please sign in to comment.