I am making my own start/bookmarkpage as a hobby project.
I want to organise my bookmarks in a clean way. I like the way Apple has done this by requesting the meta app icon, so i made a JavaScript / Ajax / PHP function that does the job.
However, when a site has no app icon in it's head, I want to know which main color the site uses, like you can see here
apple bookmarks on safari (the background has the websites main color)
chrome bookmarks (the border bar on the bottom has the website's main color)
I searched for JavaScript functions. Didn't find any, which means I must make one myself. I think it can be done by indexing multiple html tags (like headings, a-tags, buttons etc.) of the website.
The color that these elements have in common, should be the websites main color.
Have you guys any other ideas or suggestions on how to achieve this?