A JQuery plugin that calculate the average color of an HTML img
tag.
<script type="text/javascript" src="../js/jquery-latest.js"></script>
<script type="text/javascript" src="../js/jquery.average-color.js"></script>
####Example 1:####
<img id="myImg" src="../img/nature.jpg" alt="nature" />
<script>
var color = $("#myImg").averageColor();
$("body").css("background", color);
</script>
####Example 2:####
It is also possible to get the average color without using the Jquery plugin.
<script>
var color = averageColor("path/myImage.jpg");
$("body").css("background", color);
</script>
Jquery Average-color Copyright 2014 Mourad Sabour, mourad.sabour[at]gmail.com.