PDA

View Full Version : Hex Color Display



Azpilot
08-16-2007, 12:03 AM
I am very new to JavaScript. I know some php but am looking for a way to display the results of a color chooser like this site does. (http://matrixsoftware.virtualave.net/)
If anybody knows where to point me for a start. Id like to learn how this is done without refreshing the browser. I assume the colors values are just passed as a variable from the pallet to the display box....

Thanks!!

Twey
08-16-2007, 01:09 AM
I assume the colors values are just passed as a variable from the pallet to the display box....It's a little more complex than that: the colour picker image is crafted in such a way that the saturation and value of any given position can be worked out using its Cartesian coordinates (saturation along X, value along Y). The "dynamic" changing of the main selector area in response to the changing of the hue bar is actually accomplished using a PNG with translucent parts with a solid CSS colour behind.