private void palettePicker1_EditColour(int ind) { Color change = pal.pal[ind]; if (_cp == null || _cp.IsDisposed) { _cp = new ColourPicker(); } _cp.R = change.R >> 3; _cp.G = change.G >> 3; _cp.B = change.B >> 3; if (_cp.ShowDialog() == DialogResult.OK) { pal.pal[ind] = Color.FromArgb(_cp.R << 3, _cp.G << 3, _cp.B << 3); palettePicker1.SetPalette(pal); RenderBuffer(); RenderZoomCache(); drawingBox.Invalidate(); } }