Just released: color-finder
ColorFinder is a small javascript library that detects the main color in an image. The algorithm is simple and flexible. By the way of a callback method, you can influence the results by favoring certain types of colors.
You can find it here: https://pieroxy.net/blog/pages/color-finder/index.html
You can also have a look at the GitHub repo.
Re: Just released: color-finder
thanks but it is just return 0 :(
thanks but it is just return 0 :(
thanks and URL
thanks and URL
I changed the image but it is still black :(
I changed the image but it is still black :(
In your example, the page is hosted on onman.ir and the image (the new one) is hosted on www.theflowerstandchelsea.com so the script doesn't have the permission to actually read the pixels. Can you give it a try with another image on your own domain?
change to same domain image
change to same domain image
Of course, checking the image load status (or registering a listener to it) is a much better solution.
Re: Just released: color-finder
Re: Just released: color-finder
Re: Just released: color-finder
Re: Just released: color-finder