This is a migrated thread and some comments may be shown as answers.

Pick color from a picture

1 Answer 85 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Henry
Top achievements
Rank 1
Henry asked on 24 Feb 2012, 01:57 AM
Hi, is it possible to pick a color from a picture, instead from a palette. Or pick a color from anywhere in the browser. Thanks, Henry

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 27 Feb 2012, 08:10 PM
Henry:

In the current release of RadColorPicker,  you can get and set the current color of a RadColorPicker programmatically only through a System.Drawing.Color type.

But, it is also possible to convert a hex color code to and from a System.Drawing.Color through the static methods FromHtml and ToHtml of the System.Drawing.ColorTranslator class.

There is no functionality in RadColorPicker to get the hex value of the selected pixel of an image or in the screen display. It seems that this could be possible using JavaScript. See the JavaScript eyedropper (tell color of Pixel under mouse cursor).

If you could do this with JavaScript, you'd then be able to use the value to set the "SelectedColor" by passing it to this method:

RadColorPicker1.SelectedColor = ColorTranslator.FromHtml(hexValue);

Hope this helps!
Tags
ColorPicker
Asked by
Henry
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or