Example #1
0
 private void HSLChangeSlider(Color color)
 {
     RGBandHSL.RgbToHls(color.R, color.G, color.B, out double h, out double l, out double s);
     hueSlider.Value        = h;
     saturationSlider.Value = s;
     lightnesSlider.Value   = l;
 }
Example #2
0
        private void CopyHSL(object sender, RoutedEventArgs e)
        {
            Color color = GetColor(sender);

            RGBandHSL.RgbToHls((int)color.R, (int)color.G, (int)color.B, out double h, out double l, out double s);
            Clipboard.SetText("hsl (" + Math.Round(h).ToString() + ", " + "%" + (Convert.ToInt32(s * 100)).ToString() + ", " + "%" + (Convert.ToInt32(l * 100)).ToString() + ")");
        }
Example #3
0
 private void HSLChangeText(Color color)
 {
     RGBandHSL.RgbToHls(color.R, color.G, color.B, out double h, out double l, out double s);
     hueTextBox.Text        = (h * 100).ToString();
     saturationTextBox.Text = (s * 100).ToString();
     lightnessTextBox.Text  = (l * 100).ToString();
 }