Get new jQuery plugins just once a week

Adaptive backgrounds

Adaptive backgrounds | jQuery plugin to extract dominant color

Adaptive Backgrounds is a jQuery plugin for extracting dominant colors from images and applying it to its parent.
It has got the following options :-

selector String (default: 'img[data-adaptive-background="1"]') a CSS selector which denotes which images to grab/process. Ideally, this selector would start with img, to ensure we only grab and try to process actual images.

parent falsy (default: null) a CSS selector which denotes which parent to apply the background color to. By default, the color is applied to the parent one level up the DOM tree.

normalizeTextColor boolean (default: false) option to normalize the color of the parent text if background color is too dark or too light