This project is read-only.

Color Picker not displaying properly


I am using color picker in my 3.5. I have tried calling by placing server control and also dynamically. But it doesn't render properly. Could anyone look into this issue. I followed the same steps as implemented in YUIAspNetDemo web solution. Attached is the screen shot of the color picker.

file attachments


ra00l wrote Nov 24, 2008 at 7:18 AM

can you send me the aspx/ascx & code behind in which you use ColorPicker? Also send me the web.config file.

Thanks for using the YUIAsp.Net suite!

sundeep_38 wrote Nov 25, 2008 at 7:23 AM

Thanks for the reply. I have attached the required files.

wrote Nov 25, 2008 at 7:23 AM

ra00l wrote Nov 25, 2008 at 12:44 PM

sundeep, what you found is indeed a bug. It will be fixed in the next release version.
To go around it, get the css & images attached and add them somewhere in your project.
Then, on the page you want to use the ColorPicker, manually include the css(if you put the folder in a theme folder that will be done for you).

Please tell me if it worked,

wrote Nov 25, 2008 at 12:44 PM

sundeep_38 wrote Nov 25, 2008 at 3:57 PM

Hi Raul,

Thank You! Its working now.
  1. I have a query reg. Color Picker client side accessing. My requirement is showing the Color Picker in client side Ajax modal popup control. When user selects the color (from CP in ModalPopUp) and clicks on "Ok" button the value from color picker should be populated in the text box. How can I achieve this.
  2. And also I don't have to present so many options to the user. Only slider and color chooser is enough. I had used all the options like setting all the properties starting with 'Show' keyword to false. But How Can I disable the Show Color Details link from it.

sundeep_38 wrote Nov 25, 2008 at 5:21 PM

Hi Raul,

Yes. I got it working too. I regret if I wasted your time.


ra00l wrote Nov 25, 2008 at 6:54 PM

Let's see:
  1. From client side, you have acces to the RGB colors(control.get_ColorPersister() will return the ID of a hidden field where the Red Green and Blue colors are). The actual YUI control also exposes lots more information. You should also have a look at its documentation & samples.
  2. Use the following css:
    /hide all controls../
    .yui-picker-swatch {display:none}
    .yui-picker-websafe-swatch {display:none}
If you still have some customizations to make, have a look at the generated HTML with Firebug.

sundeep_38 wrote Nov 26, 2008 at 5:07 PM

Hi Raul,

Color Picker is not rendering properly in FireFox browser. I think CP is not with full featured functionality yet.


ra00l wrote Nov 26, 2008 at 6:42 PM

I always test the display in (at least) Firefox and IE 6 & 7.
I would really appreciate you posting a screenshot of the problem.
Thanks a lot,

sundeep_38 wrote Nov 26, 2008 at 7:02 PM

Raul, I had attached the screenshot of it. Issues are:
  1. Color Chooser and slider are movable all through the screen. As in the attached screenshot, you can see them completely out of box.
  2. Preview is not shown in the small box when I drag the color chooser
  3. Unable to access hidden control via. JavaScript.
All three points work well with IE.


wrote Nov 26, 2008 at 7:02 PM

ra00l wrote Nov 26, 2008 at 8:15 PM

my guess is the display problems are css related, and the js client, should work.
First thing I will do, in the next release, I will provide more examples of using the ColorPicker.

If you'd like my help, can you send me a small project with the behaviour you describe and I will make it work for you :D

wrote Feb 13, 2013 at 3:18 AM

xiaoyuandlg wrote Feb 14, 2014 at 3:10 AM

Some color dialog control seems to including a color picker.