Open dfc1883 opened 9 years ago
I've used your color-thief successfully apart from uploading an entirely white image. just a simple 100x100.jpg that is completely #ffffff
I couldn't get it working in my script - it has the error
Uncaught TypeError: Cannot read property '0' of null (which refers to the following line marked ****)
ColorThief.prototype.getColor = function(sourceImage, quality) { var palette = this.getPalette(sourceImage, 5, quality); var dominantColor = palette[0];**** return dominantColor; };
I tried to figure it out, but then decided to try it in your live demo at http://lokeshdhakar.com/projects/color-thief/
and it breaks that too.
Dup of #40, #58, #62 and #49. It's a "feature", see my comment on #49.
I've used your color-thief successfully apart from uploading an entirely white image. just a simple 100x100.jpg that is completely #ffffff
I couldn't get it working in my script - it has the error
Uncaught TypeError: Cannot read property '0' of null (which refers to the following line marked ****)
ColorThief.prototype.getColor = function(sourceImage, quality) { var palette = this.getPalette(sourceImage, 5, quality); var dominantColor = palette[0];**** return dominantColor; };
I tried to figure it out, but then decided to try it in your live demo at http://lokeshdhakar.com/projects/color-thief/
and it breaks that too.