Represents a common dialog box that displays available colors along with controls that enable the user to define custom colors.

This class provides a way to prompt the user to select a color. The color can be picked either through a list of preset colors or using the visual picker. Once a color is selected, the details of the new color will be shown in a GroupBox, along with a visual comparison of the old and new color.

For a full list of properties, methods and events see the API documentation.


Custom Colors

The ColorDialog features several ways to get the perfect color. The Hex, RGB, or HSB value can be manually entered, the user can pick a value from the Preset Colors, or fine tune a value with the Visual Picker.

How To

Customize the Appearance

The ColorDialog component can be customized by applying appearances to each individual control within the dialog. This includes the textboxes, picker, and more.

To customize these controls, create a new class that inherits from ColorDialogUI, add the custom ColorDialog constructor, and modify the controls within it:

public partial class CustomFolderBrowserDialogUI : FolderBrowserDialogUI
		public CustomFolderBrowserDialogUI(FolderBrowserDialog folderDialog) : base(folderDialog)
			this.HeaderBackColor = Color.Green;
			this.buttonOK.BackColor = Color.Green;
			this.buttonCancel.BackColor = Color.Green;

After applying the ColorDialog's DialogTemplate property to the new class, the resulting popup will look like this:

For instructions on how to use a custom template to offer advanced customization of the ColorDialog, see below.

Last updated