JamesGMills
Programmer
Hi guys,
I am currently working on a website which is for artists to upload and showcase their artwork.
I have created the script to upload the images of the artwork. From these images I work out the top ten hex colours found in the image.
Now what I want to do is run those hex colour codes through a function which will cross reference with a list of colour names and return the colour which is closest.
Much like what this does:
I have found this which is a great start but unfortunately a colour I would very much expect to return Yellow for example, does not... it returns orange. Also one which i would expect to return blue returns silver.
Does anyone know of a good solution for this? Which works like the first javascript example?
Thanks in advance,
James
------------------------
I am currently working on a website which is for artists to upload and showcase their artwork.
I have created the script to upload the images of the artwork. From these images I work out the top ten hex colours found in the image.
Now what I want to do is run those hex colour codes through a function which will cross reference with a list of colour names and return the colour which is closest.
Much like what this does:
I have found this which is a great start but unfortunately a colour I would very much expect to return Yellow for example, does not... it returns orange. Also one which i would expect to return blue returns silver.
Does anyone know of a good solution for this? Which works like the first javascript example?
Thanks in advance,
James
------------------------