Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var image = new Image;
- var colorThief;
- var dominantColor;
- image.onload = function() {
- colorThief = new ColorThief();
- dominantColor = colorThief.getColor(image);
- }
- image.src = "/gfx/header/6700f8a540fd7188bfc7533f3eb73f22.png";
- console.log(dominantColor);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement