How can I get the CurrentColorText (defaults to '(Current Color is {0})', to display the colour name rather than the hex value in {0} ???
Shame question for preview too so I would like to see...
'Your team colour is Yellow' not 'Your team colour is FF66C3' etc.
Terry
3 Answers, 1 is accepted
0
Georgi Tunev
Telerik team
answered on 23 Jul 2008, 01:26 PM
Hi Terry,
I am afraid this is not possible. RadColorPicker is designed to use HTML colors and it outputs the color names in hex format. If it used real names, the number of colors would have been very limited.
Sorry to dredge up an old post, but has this been changed? The documentation for the RadColorPicker clearly says, "The color may display as a color name or a hexadecimal string." and yet I can find no way of setting this.
0
Rumen
Telerik team
answered on 15 Sep 2010, 12:33 PM
Hi Bryan,
You can display the selected color's title using the get_selectedColorTitle() method, but you cannot convert the hexadecimal strings to color names, because as Georgi already mentioned the HTML color names are limited.
You can define your own set of colors which offer HTML color names and get their names using the get_selectedColorTitle method:
<script type="text/javascript">
functioncolorChange(sender, eventArgs) {
varmyDiv = document.getElementById("myDiv");
myDiv.innerHTML = 'Color name is '+ sender.get_selectedColorTitle();
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items