color-thief icon indicating copy to clipboard operation
color-thief copied to clipboard

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

Open peteparker opened this issue 4 years ago • 1 comments

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

peteparker avatar Mar 19 '20 15:03 peteparker

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

AlfredJKwack avatar Mar 19 '20 19:03 AlfredJKwack