thank you both for your replies.
I think I understand what your trying to say Weedpacket and I will try it out soon.
- Make HEX value from database to RGB
- Make RGB to HSB
- Create an array of colours with different saturations and brightness by increasing or decreasing these values at the same rate.
- Change to RGB array
- If the hex value the user entered (converted to RG😎 is in the array (gradient) of colours that was created from the HEX value in the database then the colour the user picked was close enough to that colour.
Does that sound right?
I haven't yet tried increasing the saturation and brightness via php, but I done it in an image program (Fireworks 8) and I see that if you increase both the saturation and brightness at the same time you get different shades of that colour. Trouble is, if you increase or decrease the brightness too much, you end up with black or white - of course, this would happen with every colour so would you recommend I stop the increase and decrease at say 50 each way?
by "closest to that colour" I mean closest to that shade of colour.