From a85d7f5af5961f6e3dc8bd53b321ab6f43557e74 Mon Sep 17 00:00:00 2001 From: martinchrzan Date: Fri, 2 Oct 2020 21:53:25 +0200 Subject: [PATCH] Fixed hsl color rounding --- ColorPicker/Helpers/ColorFormatHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ColorPicker/Helpers/ColorFormatHelper.cs b/ColorPicker/Helpers/ColorFormatHelper.cs index 1db8617..1b49d8f 100644 --- a/ColorPicker/Helpers/ColorFormatHelper.cs +++ b/ColorPicker/Helpers/ColorFormatHelper.cs @@ -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 + "%)"; }