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.46k stars 1.31k forks source link

Parent dominant color for a background of an image located on another domain #185

Open peteparker opened 4 years ago

peteparker commented 4 years ago

Hi to all, we need to achieve the following: on a Wordpress website create a DIV that holds an image URL located to another domain and the background colot of the DIV shall be the dominant color of the image (see image enclosed)

we need an example of the HTML code and how the script shall be written we have more than one image to be shown with their own specific coloured background we have to user an image URL since the images are dinamically changed on the server so the background color shall be re-coluored depending on the specific image that corresponds to that URL

dominant-color

AlfredJKwack commented 4 years ago

That is a laudable objective. The example you need is here: https://lokeshdhakar.com/projects/color-thief/ Kindly showcase your progress in this thread.