The DevExpress ASP.NET Color Edit (ASPxColorEdit) editor allows end-users to easily set a background, border or font color (among other elements). You can type the value directly into the editor's text box, select a color from the color palette in the editor's dropdown window, or use the optional color picker to select a custom color. End-users can specify colors by typing directly within the edit box by using longhand or shorthand hexadecimal notation (HEX) for RGB color values (#f0f, #D8D8D8, etc.), or by using standard HTML color names ("red", "green", etc.), which are then automatically converted to color codes.
The custom color picker can be invoked by clicking the Custom Color… button in the color palette dropdown. The button is not displayed by default. You can show it by setting the EnableCustomColors property to true.
The number of color palette columns is controlled by the ColumnCount property. In this demo, use the Column Count spin edit to specify the column count.
The Palettes combo box allows you to set one of the predefined color palettes, which is created programmatically using the properties and methods exposed by the ColorEditItemCollection collection (see the C# or VB code).
In this demo, ASPxColorEdit instances are used to specify background and foreground colors for the header and content elements of an ASPxRoundPanel control. For this purpose, each editor's client ColorChanged event is handled to respond to a color change within the editor, and to send a callback using the ASPxCallbackPanel's client PerformCallback method. On the server side, the selected color is obtained via the editor's Color property value and applied to the corresponding property of the ASPxRoundPanel control.