I am wondering if there is a way to detect the prominent color of a webpage? I mean mainly the background color of the page using javascript and html5.
Please note that I am mainly considering two scenarios: 1. a page with a background color and 2. a page with a background image.
I will more more than happy if any has some good ideas on this question.