Get the average color from an HTML img element.