private void UpdateFromRGB() { int r = GetInt(redTextBox); int g = GetInt(greenTextBox); int b = GetInt(blueTextBox); rgbColor = Color.FromArgb(r, g, b); hslColor = HSColor.RGB2HSL(rgbColor); SetHSLTextBoxes(); SetGraphics(); SetColorPanel(); }
/// <summary> /// Set current selected color. /// </summary> /// <param name="color">Current color.</param> /// <returns><c>True</c>.</returns> public override bool SetColor(Color color) { setting++; alphaNud.Value = (decimal)color.A; setting--; rgbColor = Color.FromArgb(255, color); hslColor = HSColor.RGB2HSL(rgbColor); SetRGBTextBoxes(); SetHSLTextBoxes(); SetGraphics(); SetColorPanel(); return(true); }