Hacker News new | ask | show | jobs
by ro_dobre 756 days ago
That's a really interesting idea that I didn't get to experiment on, unfortunately. It's currently screenshotting each crawled website and extracting the colors from the pixel values.

One filter I added to make the palette a bit more relevant is that I try to find out which is the background color (the most used color) and only pick colors that are at least somewhat contrasting with the background (assuming that websites would follow somewhat basic color contrast rules).

When I tried extracting the palettes from CSS rules, what I ran into is that each website uses lots of vendors that render stuff (cookie consents, promotional pop-ups, etc.) and it's hard to distinguish what's rendered and what's not with pure CSS selectors, so I resorted to decomposing the website's theme from the perspective of a user. (through a screenshot)

It's a great idea nonetheless, I'm sure I would have some good results with it if I manage to filter out the noise, thanks a lot!