Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

This has intrigued me for quite some time.

Does anyone know the algorithm Windows 7 Aero uses to determine the colour to use as the mouse-tracking hover highlight on taskbar buttons for currently-running apps?

Windows 7 taskbar hover colours

It is definitely based on the icon of the app, but I can't see a specific pattern of where it's getting the colour value from.

It doesn't seem to be any of the following:

  • An average colour value from the entire icon, otherwise you would get brown all the time.
  • The colour used the most in the image, otherwise you'd get yellow for the SQL Server Management Studio icon (6th from left). Also, the Chrome icon used red, green and yellow in equal measure.
  • A colour located at certain pixel coordinates within the icon, because Chrome is red -indicating the top of the icon - and Notepad++ (2nd from right) is green - indicating the bottom of the icon.
share|improve this question

closed as off-topic by Charles Wesley, Code Maverick, JohnGB, Erics, Benny Skogberg Mar 19 at 7:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about Implementation are off-topic because this site is for User Experience design questions, not questions around how to implement these designs. Therefore, questions around the use of programs like Photoshop or languages such as CSS or JavaScript are off topic." – Charles Wesley, Code Maverick, JohnGB, Erics, Benny Skogberg
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Your question is possibly better suited for SuperUser –  MonkeyZeus Mar 18 at 18:35
    
Somewhat related: stackoverflow.com/q/13637892/472021 –  Kasra Rahjerdi Mar 18 at 20:31
    
@MonkeyZeus it’s not –  kinokijuf Apr 5 at 11:02

1 Answer 1

The feature you're looking for is called (by Microsoft) the "Color hot-track".

As described by Raymond Chen in this MSDN blog article:

Some people ask how it's done. It's really nothing special. The code just looks for the predominant color in the icon. (And, since visual designers are sticklers for this sort of thing, black, white, and shades of gray are not considered "colors" for the purpose of this calculation.)

Google uses a similar feature in its Most Visited/new tab page, which has been thoroughly explained with code samples on this Quora post.

share|improve this answer
    
Well, there you go then! I was convinced it wasn't that, but I must have been wrong. Thanks. –  theyetiman Mar 19 at 9:04
    
Actually, sorry I accepted your answer when I shouldn't have. The article you link to doesn't really explain what "predominant color" means, or how it is calculated. There are many comments on that blog asking my question with no clear cut answer given. Thanks for the info though - I didn't know it was called "color hot-tracking". –  theyetiman Mar 19 at 9:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.