The Angular Surround a picture with its dominant color using a simple directive.
This directive is essentially extracting the dominant color from an image and applying that color to its parent’s background. Here’s the most simple example:
<!-- Load the script after AngularJS --> <script src="angular.js"></script> <script src="angular-adaptive-backgrounds.js"></script>
// Make sure your app depends on this module var myApp = angular.module('myApp', ['mb-adaptive-backgrounds']);
<!-- This guy will get receive a background color... --> <div adaptive-background> <!-- from this image --> <img src="cool.jpg"> </div>