Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Can anyone explain how to calculate the highlight color based on dominant color in images like Windows-7 taskbar when mouse is over the taskbar item? Any c# code?

images of windows7 taskbar item on mouse hover

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
265 views
Welcome To Ask or Share your Answers For Others

1 Answer

I believe what it does is take the most prominent color in the application's icon using a method similar to this: Python - Find dominant/most common color in an image

With that information, it then applies a translucent radial gradient hue and positions it based on your mouse location. The gradient is more white toward the center of your mouse, but the center is actually off screen. The closer to the actual taskbar item, the more transparent it becomes.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...