The ColorEditor control represents a customizable web color editor. It supports three different color models - RGB, HSV and HSB. Server side
- Getting and setting the control's value
Use the ColorEditor.SelectedColor property to get or set the control's current value.
- Customizing the control
Use the PaletteMode property to set the control's displayed palette.
- Events
The following events are exposed by the ColorEditor class.
Client side- Getting a reference to the control
You can access the control on the client side by its ClientID. JavaScript
Copy Code
|
---|
var colorEditor = $find("ColorEditor1"); var colorEditor = $find("<%= ColorEditor1.ClientID %>"); |
- Getting and setting the control's selected color.
Use the get_selectedColor and selectColor methods to get or set the control's selected color.
JavaScript
Copy Code
|
---|
colorEditor.selectColor("#ff00ff"); colorEditor.selectColor("fuchsia"); colorEditor.selectColor("#f0f"); alert(colorEditor.get_selectedColor()); |
- Events
The following client-side event are exposed by the ColorEditor class.
|