3 ms·
Google uses k-means clustering in Chrome on their new tab page (though they use RGB). The most visited section shows a color strip below each site, with a color
by drifkin 14y ago
Google uses k-means clustering in Chrome on their new tab page (though they use RGB). The most visited section shows a color strip below each site, with a color chosen from the site's favicon.
Here's the code:
http://src.chromium.org/svn/trunk/src/ui/gfx/color_analysis.cc http://src.chromium.org/svn/trunk/src/ui/gfx/color_analysis....
- drifkin 14y agoIt turns out the header file actually has a pretty nice explanation of the algorithm: http://src.chromium.org/svn/trunk/src/ui/gfx/color_analysis.h http://src.chromium.org/svn/trunk/src/ui/gfx/color_analysis....
- mixonic 14y agoI am going to straight up lift that idea into a web app I've built. Providing users a hint more context about their content makes interfaces less bland and anonymous. Thanks for raising it!