Windows 7 Taskbar Icons Highlight Color

后端 未结 1 1921
悲&欢浪女
悲&欢浪女 2020-12-15 09:43

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?

1条回答
  •  萌比男神i
    2020-12-15 10:41

    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.

    0 讨论(0)
提交回复
热议问题