How to display a color picker

So, I need a color picker for my voxel editor. I know how to get the mouse position, and after some research, I know how to get the color of a pixel on the screen. The only thing I need help with is how to display the color picker. What I thought of is a for loop that iterates 255 times for the red values, 255 times for the green values, and 255 times for the blue values. Then it creates a 1 pixel quad for each pixel. Probably not very efficient, right? How should I do this? Thanks!

TWL has a color picker widget (in addition to many other useful widgets). You can test the color picker in the TWL Demo or in the TWL Theme Editor (both are webstart links). The editor is completely written using TWL.

I’ve looked at TWL. Would you mind if I just stole some of your code for the color picker (It’s open source, right?) I’d rather just use the color picker, and not include a bunch of tools for a full gui. Also, should I choose to use TWL in another project, will I just have to add some TWL stuff, and everything I’ve already programmed will work as-is? Or will I have to completely restructure my game?

A very simple way to make a color picker is to use textures like so:

If the hue slider is at the middle, for example, that means the hue will be 360 * (1 - sliderY / sliderHeight) = 180, i.e. cyan. Render that (with full saturation/value) behind the saturation/value box in order to recolor it.
Apply the same idea to determine the saturation (% of width) and value (1 - % of height) and finally convert the HSV to RGB.

Code example using slick:
http://pastebin.com/NcAMpYd2