View Full Version : Color Picker modified using Ext, is this possible?

26 Sep 2007, 10:32 AM
Hey all,

I'd like to stick to Ext for a project I'm working on. We ran into a color picker which "Ohhh and Ahhh'd" some of the higher up folks. The example can be found here:


Would it be trivial to get similar functionality working in the current color picker? We want to be able to eventually swap out the 'colors' with arbitrary data, like medical codes etc. When clicked, these medical codes will fill up input value boxes.

Thank you for any insight. :-)

- sf

26 Sep 2007, 2:47 PM
I can't quite remember who, but somebody created a color picker field. Try searching the examples/extras or user extensions forum.

26 Sep 2007, 2:53 PM
Well, there is this colorPicker which I found:


But it's quite different from what I need. Essentially the 'colors' will be replaced with some other arbitrary data later on. It's nice to have that data available and displayed like the one I linked. It offers a minimal amount of clicks solution in order to pre-populate input text fields which is a requirement for us.

Thanks for the reply though, really appreciate it.

- sf

26 Sep 2007, 2:55 PM
Since 'arbitrary data' is pretty broad (images? long paragraphs of text? codes? etc), the best suggestion I could give would be to use a view.

26 Sep 2007, 3:01 PM
Not entirely sure how Views work, I guess I'll have to google for some examples. I looked at the one in the demo and I'm not entirely sure if it'll fit in for us.

What I was thinking is getting all of the different HEX values for colors (just to start building something similar to Telerik's above) and just simply creating a table that populates td values with empty data, and sets a background color on the td's to whatever the HEX value is.) Perhaps I can contain all of that within an Ext Dialog. I need to be able to continually track what color a user is on top of while their mouse is moving. This way it's only one click to open and see all the values, and lastly one last click to select the color that's required and populate an input text field with that HEX code.

Does that make a bit more sense?

26 Sep 2007, 3:39 PM
I'd suggest checking out the image chooser in the docs.

It uses a view to display the images, by using a template and then populating it with JSON data.

26 Sep 2007, 3:48 PM

Do you think I can manipulate the view to populate with random hex colors, and work with onmouseOver type event handlers to manipulate an input text? I hope I'm making sense, it's tough for me to explain. I'd ultimately need very similar functionality to the stuff I linked above I guess.

- sf

26 Sep 2007, 4:09 PM
Sounds like you're looking for something like: http://extjs.com/forum/showthread.php?t=5106&highlight=colorpicker

26 Sep 2007, 5:06 PM
Sounds like you're looking for something like: http://extjs.com/forum/showthread.php?t=5106&highlight=colorpicker

Hi Jeff,

That looks like what I need! Thank you both for pointing me in the correct direction. I'll take a look at the code and start working on it from there.

Thanks again. :-)

- sf