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

Color not updated in HSB palette

3 Answers 58 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 07 Jan 2011, 12:10 PM
I have a problem with selecting a color in the HSB selection mode when opening the HSB panel while the color #ffffff or #000000 is selected. I can reproduce this issue on the telerik demo pages (http://demos.telerik.com/aspnet-ajax/colorpicker/examples/default/defaultcs.aspx).

Select #ffffff or #000000 on the webpalette and open the HSB panel. Now notice that the RGB values are not updated when clicking in the color spectrum. This only happens when first #ffffff or #000000 is selected, any other color works fine.   

3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 12 Jan 2011, 04:46 PM
Hello Eric,
The result you describe is expected, because when the B (brightness) is set to 100 or to 0, the result color is always #ffffff or #000000, no matter the other two values. That is why, in order for the R, G and B values to change, you need to set different value for brightness - e.g. by dragging the thumb of the slider.

Greetings,
Tsvetie
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
David
Top achievements
Rank 2
answered on 08 Mar 2012, 01:04 AM
This is expected behavior? sorry but that is crazy, a user setting the colorpicker to white, then changing their mind and wanting to select a different color (in HSB mode) will present them with an interface that appears not to work!? are we really expected to explain all this to the people that use our websites

0
Slav
Telerik team
answered on 12 Mar 2012, 02:41 PM
Hello David,

Note that the interface of the HSB palette is determined by the HSB representation of colors and it is recommended to be familiar with it in order to be able to use this mode without difficulties. As you can check in the attached screen capture, the used interface is standard and can be viewed as well in the settings of Visual Studio.

The following resources contain more information on the HSB representation of colors:

If using this palette is problematic for most of your visitors, you can switch it with any of the other available modes, demonstrated in this online demo. Another option is to reference the palette on the client-side and to change the default value of the brightness, using the following approach:

function OnClientLoad(sender, args) { // handler of the OnClientLoad client-side event
    var millionColorSlider = $find("<%= ColorPicker1.ClientID %>").get_millionColorsSlider();
    var b = millionColorSlider.get_value();
    if (b == 0 || b == 100) {
        millionColorSlider.set_value(50);
    }
}
All the best,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ColorPicker
Asked by
Eric
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
David
Top achievements
Rank 2
Slav
Telerik team
Share this question
or