I’ve been playing around with extracting colors from favicon images as a shorthand for the theme colors of a website — can y’all think of a better or easier way? Something to do with using a site’s CSS directly?
Also posted to Bluesky.
23 replies
@zachleat I briefly tried doing this with Puppeteer, a screenshot, and ImageMagick. Didn't get anywhere. Rooting for you!
@eeeps oh no 😅
-
-
Have you seen superposition.design from @kilianvalkhof.com
Fascinating — looks great! I’m looking for something a little lower level though
I am curious to know what you find. 👀
Lower level how?
a library or package I can install from a script
Maybe @projectwallace.com then
Yup, sounds like a job for github.com/projectwalla... which also powers projectwallace.com/design-tokens.
@zachleat a screenshot plus mean shift clustering could work nicely to get a colour vibe of a web page https://youtu.be/HuW9qJbL0xM
@elly oh dang, that was a great video — I’ll be thinking about that for awhile!
1. cssstats.com like parsing to get all colors/count.
2. convert to oklch
3. filter high/low lightness values.
4. filter low chroma.
5. use the highest-count, non filtered color.ooh cssstats is a good shout, thanks!
Vibrant.js on the logo / favicon is good solution right?
-
I haven’t used this one yet! I have used github.com/Namide/extra... with some success though
-