private void UpdateColors() { var deltaHue = hueBar.Value; var deltaSat = 2.0 / (saturationBar.Maximum - saturationBar.Minimum) * saturationBar.Value; var deltaLight = 2.0 / (lightnessBar.Maximum - lightnessBar.Minimum) * lightnessBar.Value; var enumValues = Enum.GetValues(typeof(ColorTableGroup)); foreach (ColorTableGroup colorTableGroup in enumValues) { // Skip empty colors. if (initialColorTable[colorTableGroup] == Color.Empty) continue; HslColor hslColor = HslColor.FromColor(initialColorTable[colorTableGroup]); colorTable[colorTableGroup] = new HslColor(hslColor.Alpha, hslColor.Hue + deltaHue, hslColor.Saturation + deltaSat, hslColor.Luminosity + deltaLight).ToColor(); } MainForm.Renderer.RefreshToolStrips(); }