Clicky

hello,

could anyone provide or point me in the direction of a tutorial for achieving something very similar to the colour picker on this website below?

http://www.colourcode.net/windows.php

Basically a colour picker that will change the colours in the image and then record the final colour on click of a 'choose colour' button.

Or anything similar...

cheers!

asked 12/08/2011 01:44

igloobob's gravatar image

igloobob ♦♦


3 Answers:
its using a Jquery plugin called Farbtastic
you can download it here and read its turtorial
http://acko.net/dev/farbtastic
link

answered

plusone3055's gravatar image

plusone3055

ok great thanks I'll take a look at that tomorrow...
link

answered 2011-12-08 at 10:08:55

igloobob's gravatar image

igloobob

That color picker is easily rendered using the HSL(hue, saturation, luminance) color space.  The outside circle is the hue(color).  It has values between 0 and 2*PI.  In the square, vertically is the saturation.  Values for saturation are between 0 and 1.0.  And then left to right I believe you have Luminance(intensity) which has values between 0 and 255(0 is black, 255 is pure white).  There are very simple conversion algorithms from HSL to RGB so that you can render in RGB values.  See something like the following:

http://130.113.54.154/~monger/hsl-rgb.html

link

answered 2011-12-08 at 10:18:11

a235301's gravatar image

a235301

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×125

Asked: 12/08/2011 01:44

Seen: 394 times

Last updated: 12/12/2011 08:35

Categories