private void updateEffect() { float r = 0; float g = 0; float b = 0; int a = aSlider.Value; if (checkBox1.Checked) { r = rSlider.Value / 255F; g = gSlider.Value / 255F; b = bSlider.Value / 255F; } else { r = rSlider.Value; g = gSlider.Value; b = bSlider.Value; } workspaceManager.PreviewColorShiftSelection(r, g, b, a, checkBox1.Checked); }