lokesh / color-thief

Grab the color palette from an image using just Javascript. Works in the browser and in Node.
https://lokeshdhakar.com/projects/color-thief/
MIT License
12.67k stars 1.31k forks source link

Getting Type error #167

Closed prashant-andani closed 5 years ago

prashant-andani commented 5 years ago

Here is the code I'm trying out...

`import ColorThief from "colorthief";

ColorThief.getColor(document.querySelector("img")) .then(color => { console.log(color); }) .catch(err => { console.log(err); });

lokesh commented 5 years ago

If you need help using Color Thief, please post on Stack Overflow to get the most eyes on your problem. When you do post, make sure to include information more details on your usage such as Node version. Read more about support requests on the help page: https://lokeshdhakar.com/projects/color-thief/#help