A JavaScript plugin for extracting the dominant color from images and applying the color to their parent.
- Simply set a data attribute on desired images and the plugin will apply the image's dominant color to it's parent element's background.
- Caveat: Doesn't work with remote images if the respective server has CORS disabled, ie. it won't work with Flickr URLs...
- Credit: Heavily inspired by jquery.adaptive-backgrounds.js - basically, it's the jQuery free version.
- Browser support: IE9+
Usage
Example
Demo