Extract the main colour of an image's borders (jQuery plugin)
A very lightweight and simple jQuery plug-in to extract the main color of an image's border. Just pass a callback as first parameter of the getPixelColor which takes one parameter. The parameter send to your callback will be the hexadecimal color code.
In few words:
Options:
Example :
$('#img1').getPixelColor(function(color) {
$('body').css('background', color);
});
$('#img1').getPixelColor(function(color) {
$('.divClass').css('background', color, 5, 3);
});
Live example