Change color of background based on image main color?
17,669
Here's what you could try out:
https://github.com/lokesh/color-thief
This library has a pretty cool demo: http://lokeshdhakar.com/projects/color-thief/
Found here: Get average color of image via Javascript
Author by
Admin
Updated on June 06, 2022Comments
-
Admin almost 2 years
I don't know if this is actually possible but it would be nice if it is! Taaking inspiration from the new iTunes where the background color seems to be set via the (major) color of the artwork image. I'm looking to do something similar with javascript/cs maybe using jQuery, essentially changing the background-color of a div based on an image inside it.