I’d like to use Color Thief, a script which allows you to extract the dominant color of an image.
Unfortunately I’m not able to get the code to work. I’d like the do
I struggled for a few hours to get color-thief to work. In the end it was the tiny addition of [0] to point to the first array element:
color-thief
[0]
myImage = $('#theimage'); colorThief = new ColorThief(); color = colorThief.getColor(myImage[0]); red = color[0]; green = color[1]; blue = color[2];