Skip to content

Commit

Permalink
Fixed hsl color rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
martinchrzan committed Oct 2, 2020
1 parent 3636e57 commit a85d7f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ColorPicker/Helpers/ColorFormatHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ private static string ColorToRgb(System.Drawing.Color c)
private static string ColorToHsl(System.Drawing.Color c)
{
var h = Math.Round(c.GetHue());
var s = Math.Round(c.GetSaturation());
var l = Math.Round(c.GetBrightness());
var s = Math.Round(c.GetSaturation()*100);
var l = Math.Round(c.GetBrightness()*100);
return "hsl(" + h + ", " + s + "%, " + l + "%)";
}

Expand Down

0 comments on commit a85d7f5

Please sign in to comment.