# ColorDialog

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.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation.](http://docs.wisej.com/api)
{% endhint %}

## Features

### 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.

![ColorDialog showing color selection options with hex, RGB, and HSB inputs](/files/-McjoXAvmACWVfYcQoUb)

## 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:

{% tabs %}
{% tab title="C#" %}

```csharp
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;
		}
}
```

{% endtab %}
{% endtabs %}

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

![Customized ColorDialog with green theme applied to header and buttons](/files/-MgBuhO4dydyjqgYFeBo)

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/docs/controls/common-dialogs/colordialog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
