We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › RGB Color Picker
Page Index Toggle Pages: 1
RGB Color Picker (Read 3674 times)
RGB Color Picker
May 19th, 2008, 9:49am
 
I couldn't find any good color pickers for processing so I put together my own.

http://www.julapy.com/processing/ColorPicker.pde

Might save someone an hour.
Re: RGB Color Picker
Reply #1 - Jun 30th, 2009, 8:09am
 
Nice one, thanks for sharing.
Re: RGB Color Picker
Reply #2 - Aug 11th, 2009, 4:15pm
 
Haha, agreed, this is terrific, I'm using it in my own little thing.
Re: RGB Color Picker
Reply #3 - Aug 11th, 2009, 10:52pm
 
Great one, i need something like this once in a while
Re: RGB Color Picker
Reply #4 - Dec 27th, 2009, 6:10am
 
Hi julapy (and others).

I stumbled upon this very nice color picker of yours and am using it in one of my sketches.
I have added a small selector that indicates which color is currently selected.
However, I also would like to be able to set this selector from outside the class, with a function like: setColor(color new_color);

Unfortunately I have been unable to locate a color exactly in the image, maybe you, or someone else, has a solution for this?

Thanks in advance!

Remco
Re: RGB Color Picker
Reply #5 - Dec 27th, 2009, 10:29am
 
Not so cool method:
iterate through the whole image and stop when the pixel has the wanted color.

Good method:
write an inverse method of the "color-set-method" - but thats a little bit math Wink
Re: RGB Color Picker
Reply #6 - Dec 28th, 2009, 11:21am
 
Thanks for the fast reply.

domi wrote on Dec 27th, 2009, 10:29am:
Not so cool method:
iterate through the whole image and stop when the pixel has the wanted color.

That's what I tried, but when you scale the image this doesn't seem to work.

Now for the math Smiley Got any suggestions
Page Index Toggle Pages: 1