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?
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.