color-thief
color-thief copied to clipboard
Support for style="background-image: url('.....')
Hi all, does this scenario work ? Does it only work on img tag ?
Just create an img and set the src. Something like:
const img = document.createElement('img');
img.src = document.querySelector(querySelector).style.backgroundImage.match(/"(.*?)"/)[1];