Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
svgeesus committed Dec 18, 2023
1 parent f20d78a commit efb6e7d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/spaces/hsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ export default new ColorSpace({
h = h * 60;
}

// Very out of gamut colors can produce negative saturation
// If so, just rotate the hue by 180 and use a positive saturation
// see https://github.com/w3c/csswg-drafts/issues/9222
if (s < 0) {
h += 180;
s = Math.abs(s);
}
// Very out of gamut colors can produce negative saturation
// If so, just rotate the hue by 180 and use a positive saturation
// see https://github.com/w3c/csswg-drafts/issues/9222
if (s < 0) {
h += 180;
s = Math.abs(s);
}

if (h >= 360) {
h -= 360;
}
if (h >= 360) {
h -= 360;
}

return [h, s * 100, l * 100];
},
Expand Down

0 comments on commit efb6e7d

Please sign in to comment.