Color not updated in HSB palette

4 posts, 0 answers
  1. Eric
    Eric avatar
    1 posts
    Member since:
    Sep 2010

    Posted 07 Jan 2011 Link to this post

    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.   
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 12 Jan 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    10 posts
    Member since:
    Apr 2008

    Posted 07 Mar 2012 Link to this post

    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

  5. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 12 Mar 2012 Link to this post

    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.
Back to Top