Color Chooser 1.2 try it and look at the source code!
(take some seconds to load while creating the cube)
Choose / find any color code by: typing RGB values;
increment / decrement RGB values with buttons ( -- / - / + / ++ );
selecting a color in a nice 2-D optimized color cube.
View the source of the demo page to obtain the source code.