I already asked how HSV color pickers work, now I would like to know how RGB color pickers with JavaScript work. Those that don’t use the HTML5 Canvas API. Could somebody explain me the concept behind them?
Here is an example of what I mean: http://www.eyecon.ro/colorpicker/
Note: I’m not looking for ready to use jQuery color pickers. I want to develop my own one for learning purposes! jQuery for the solution is fine though!
Assuming you want to pick RGB values between 0 and 255, similar to the example you are linking to, here’s how I would approach it:
I’m leaving creating the formulas and images to you. 🙂