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; }
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() + ")"); }
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(); }