Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 776 Bytes

README.md

File metadata and controls

13 lines (10 loc) · 776 Bytes

Adaptive-Backgrounds

A JavaScript plugin for extracting the dominant color from images and applying the color to their parent.

Full docs & demo→

  • 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+