The ColorEditor control represents a customizable web color editor. It supports three different color models - RGB, HSV and HSB.
Use the ColorEditor.SelectedColor property to get or set the control's current value.
Use the PaletteMode property to set the control's displayed palette.
The following events are exposed by the ColorEditor class.
Event | Event arguments | Description |
---|---|---|
ValueChangedEventArgs<Color> | Raised when the control's selected color has changed. |
You can access the control on the client side by its ClientID.
JavaScript
![]() |
---|
var colorEditor = $find("ColorEditor1"); |
Use the get_selectedColor and selectColor methods to get or set the control's selected color.
JavaScript
![]() |
---|
colorEditor.selectColor("#ff00ff"); |
The following client-side event are exposed by the ColorEditor class.
Event | Event arguments | Script property | Description |
---|---|---|---|
Raised when the control's selected color has changed. | |||
Sys.CancelEventArgs | Raised when the control's apply button is clicked. | ||
- | Raised just after the control has finished loading and is ready for interaction. |