Jump to content


Photo
- - - - -

[Question] Windows 7 Taskbar colors.


  • Please log in to reply
19 replies to this topic

#1 Preath

Preath

    Elite WinMatrixian.

  • Member
  • 2,352 posts

Posted 16 January 2009 - 02:25 PM

Hi, i've been wondering a little bit and i have been wondering about where does the Windows 7 taskbar get all the colors from, from all the programs running? When you hover your mouse over like Windows Media Player it gets orange, IE for light blue etc. Thirdparty programs gets their own colors too and get the color of how the thirdparty program's interface look like, or something. But where does it take the color from, exactly? :blink:


Maybe a wierd question and/or maybe a good one ^^

Edited by Emil2k, 16 January 2009 - 02:27 PM.


#2 Abhi

Abhi

    Geek...

  • Member
  • 1,113 posts

Posted 16 January 2009 - 02:38 PM

It is called "Color Hot-Track".

Posted Image

It works by dynamically abstracting the color values of the application icon to find the most dominant RGB value. So when you hover it over the icon, the glow changes according to the icon color.

#3 Preath

Preath

    Elite WinMatrixian.

  • Member
  • 2,352 posts

Posted 16 January 2009 - 03:26 PM

It is called "Color Hot-Track".

Posted Image

It works by dynamically abstracting the color values of the application icon to find the most dominant RGB value. So when you hover it over the icon, the glow changes according to the icon color.





Aah, nice.. thank you for the answer.. i was thinking about something like that, as i saw that every color the hover color was.. were in the icon too.

Edited by Emil2k, 16 January 2009 - 03:35 PM.


#4 ThunderROM

ThunderROM

    Super WinMatrixian

  • Member
  • 2,632 posts

Posted 17 January 2009 - 04:30 AM

the glow changes according to the icon color.

Wow, nice!

#5 coldemone

coldemone

    Sleeping Winmatrixian

  • Member
  • 2,029 posts

Posted 17 January 2009 - 05:05 AM

if it was rainbow, then no color will appear, just white. just learned that in a topic about this too.

#6 fediaFedia

fediaFedia

    Super WinMatrixian

  • Elites
  • 2,538 posts

Posted 17 January 2009 - 06:44 AM

It works by dynamically abstracting the color values of the application icon to find the most dominant RGB value.


Not quite dominant, try opening Local disk and you'll see that it only has a tiny green button, but the whole rolover is colorized in green

#7 pm_41

pm_41

    CS student

  • Member
  • 1,394 posts

Posted 17 January 2009 - 07:08 AM

MS did it again! I'll never know how they managed to do this...

#8 InlineSkate

InlineSkate

    WinMatrix Addict

  • Member
  • 3,182 posts

Posted 17 January 2009 - 07:36 AM

MS did it again! I'll never know how they managed to do this...



Its most likely a simple algorithm and will most likely be tweaked

#9 Abhi

Abhi

    Geek...

  • Member
  • 1,113 posts

Posted 17 January 2009 - 08:25 AM


It works by dynamically abstracting the color values of the application icon to find the most dominant RGB value.


Not quite dominant, try opening Local disk and you'll see that it only has a tiny green button, but the whole rolover is colorized in green

But that "tiny green button" has a higher RGB value than the other colors(in that icon), thus, it is painted green.

#10 Abhi

Abhi

    Geek...

  • Member
  • 1,113 posts

Posted 17 January 2009 - 08:54 AM


MS did it again! I'll never know how they managed to do this...



Its most likely a simple algorithm and will most likely be tweaked

It's one of those small things, but it makes the new Taskbar so much more fun to use.
If you're good at coding, then even you can write an app which queries for the most dominant RGB value in an icon, and paints the icon with that color. :)

#11 AMIRZ

AMIRZ

    Loyal Member and Friend

  • Member
  • 2,033 posts

Posted 17 January 2009 - 09:56 AM


MS did it again! I'll never know how they managed to do this...



Its most likely a simple algorithm and will most likely be tweaked

It's one of those small things, but it makes the new Taskbar so much more fun to use.
If you're good at coding, then even you can write an app which queries for the most dominant RGB value in an icon, and paints the icon with that color. :)


Agreed. Just another GUI element...

#12 fediaFedia

fediaFedia

    Super WinMatrixian

  • Elites
  • 2,538 posts

Posted 17 January 2009 - 10:55 AM


It works by dynamically abstracting the color values of the application icon to find the most dominant RGB value.


Not quite dominant, try opening Local disk and you'll see that it only has a tiny green button, but the whole rolover is colorized in green

But that "tiny green button" has a higher RGB value than the other colors(in that icon), thus, it is painted green.

I'm guessing that it also includes algorithms that prevent black and white type colors from being shown. And Black icons with no colors whatsoever (like cmd) are colorized with some light blue.

#13 Abhi

Abhi

    Geek...

  • Member
  • 1,113 posts

Posted 17 January 2009 - 11:32 AM

I'm guessing that it also includes algorithms that prevent black and white type colors from being shown. And Black icons with no colors whatsoever (like cmd) are colorized with some light blue.

Might be, since Black has RGB values of 0,0,0 and White has 255,255,255, which could cause conflicts for the code(related to this Color Hot-Track) while reporting which color to use.
Besides, using Black or White to re-paint the icon wouldn't look so good, think for yourself. This would not complement the Icon Text(if used with "Never Combine" or "Combine when taskbar is full" options of the new taskbar).

#14 Villain

Villain

    An Old Geek

  • Global Moderator
  • 6,000 posts

Posted 17 January 2009 - 05:29 PM

ok yall, dont go fawning over this to damn much. i had code in vb that analysed the picture and chose the dominant color some three years ago.

hell, i even had it in a wallpaper changer that would set your desktop background color to the dominant color for a seemless look.

give me a day or so and i will post the code for it in VB here.

it is NOT nothing new.

[edit] found the code some minute after i posted my response, here is the vb6 code.[/edit]

Function AverageRGB(ByRef P As PictureBox) As Long

	Dim Count As Long
	Dim Red As Long
	Dim Green As Long
	Dim Blue As Long
	Dim Hexed As String
	Dim X As Long
	Dim Y As Long
	Count = 0


	For X = 0 To P.Width Step P.Width \ 32


		For Y = 0 To P.Height Step P.Height \ 32
			Hexed = Right("00000" & Hex(P.Point(X, Y)), 6)
			Red = Red + CLng("&h" & Right(Hexed, 2))
			Green = Green + CLng("&h" & Mid(Hexed, 3, 2))
			Blue = Blue + CLng("&h" & Left(Hexed, 2))
			Count = Count + 1
		Next

	Next

	AverageRGB = RGB(Red \ Count, Green \ Count, Blue \ Count)
End Function

see? easy math through the use of RGB. Please note that this code is some three YEARS old and stop fawning over MS's shit.

actually i take it back, the code was made in 2002.

#15 Guest_Alex Fidanov_*

Guest_Alex Fidanov_*
  • Guest

Posted 27 November 2009 - 01:10 PM

ok yall, dont go fawning over this to damn much. i had code in vb that analysed the picture and chose the dominant color some three years ago.

hell, i even had it in a wallpaper changer that would set your desktop background color to the dominant color for a seemless look.

give me a day or so and i will post the code for it in VB here.

it is NOT nothing new.

[edit] found the code some minute after i posted my response, here is the vb6 code.[/edit]

Function AverageRGB(ByRef P As PictureBox) As Long

	Dim Count As Long
	Dim Red As Long
	Dim Green As Long
	Dim Blue As Long
	Dim Hexed As String
	Dim X As Long
	Dim Y As Long
	Count = 0


	For X = 0 To P.Width Step P.Width \ 32


		For Y = 0 To P.Height Step P.Height \ 32
			Hexed = Right("00000" & Hex(P.Point(X, Y)), 6)
			Red = Red + CLng("&h" & Right(Hexed, 2))
			Green = Green + CLng("&h" & Mid(Hexed, 3, 2))
			Blue = Blue + CLng("&h" & Left(Hexed, 2))
			Count = Count + 1
		Next

	Next

	AverageRGB = RGB(Red \ Count, Green \ Count, Blue \ Count)
End Function

see? easy math through the use of RGB. Please note that this code is some three YEARS old and stop fawning over MS's shit.

actually i take it back, the code was made in 2002.


You do realize that this code is not optimized and will probably never be used in an operating system.

#16 Guest_Cardin_*

Guest_Cardin_*
  • Guest

Posted 28 March 2010 - 09:18 AM

That is a pretty neat trick, this changing of colors.

The code behind it is so simple, yet it produces such a pleasant improvement in UI aesthetics. :) I think I have got to code it in a GUI someday, lol, it's quite nice.

#17 Guest_dstrout_*

Guest_dstrout_*
  • Guest

Posted 09 May 2010 - 10:07 PM

FileZilla shows up as a cool red because of it's red icon. A real nice taskbar addition!

#18 Guest_kisss256_*

Guest_kisss256_*
  • Guest

Posted 11 October 2010 - 05:38 AM

Villain,

hell, i even had it in a wallpaper changer that would set your desktop background color to the dominant color for a seemless look.


I would REALLY love to get my desktop to do this, how would i do that? (from a noobs point of view :P )

#19 Guest_James_*

Guest_James_*
  • Guest

Posted 16 December 2010 - 01:42 PM

ok yall, dont go fawning over this to damn much. i had code in vb that analysed the picture and chose the dominant color some three years ago.

hell, i even had it in a wallpaper changer that would set your desktop background color to the dominant color for a seemless look.

give me a day or so and i will post the code for it in VB here.

it is NOT nothing new.

[edit] found the code some minute after i posted my response, here is the vb6 code.[/edit]

Function AverageRGB(ByRef P As PictureBox) As Long

	Dim Count As Long
	Dim Red As Long
	Dim Green As Long
	Dim Blue As Long
	Dim Hexed As String
	Dim X As Long
	Dim Y As Long
	Count = 0


	For X = 0 To P.Width Step P.Width \ 32


		For Y = 0 To P.Height Step P.Height \ 32
			Hexed = Right("00000" & Hex(P.Point(X, Y)), 6)
			Red = Red + CLng("&h" & Right(Hexed, 2))
			Green = Green + CLng("&h" & Mid(Hexed, 3, 2))
			Blue = Blue + CLng("&h" & Left(Hexed, 2))
			Count = Count + 1
		Next

	Next

	AverageRGB = RGB(Red \ Count, Green \ Count, Blue \ Count)
End Function

see? easy math through the use of RGB. Please note that this code is some three YEARS old and stop fawning over MS's shit.

actually i take it back, the code was made in 2002.



Lol, like down south there don't be gettin yall arguaments in none them knots, yall know I mean.
I must disagree by saying that it was a pretty slick achievement. Though that code has not been fitted to a certain project or application, it could probably be easily reconstructed.

But...I have to be honest and say:
Microsoft has outgrown MAC in their visual interface. I'm sorry, but I'm just not a Mac fan!

#20 eddyq

eddyq

    My First Post!

  • Member
  • 1 posts

Posted 26 February 2012 - 05:37 PM


ok yall, dont go fawning over this to damn much. i had code in vb that analysed the picture and chose the dominant color some three years ago.

hell, i even had it in a wallpaper changer that would set your desktop background color to the dominant color for a seemless look.

give me a day or so and i will post the code for it in VB here.

it is NOT nothing new.

[edit] found the code some minute after i posted my response, here is the vb6 code.[/edit]

Function AverageRGB(ByRef P As PictureBox) As Long

	Dim Count As Long
	Dim Red As Long
	Dim Green As Long
	Dim Blue As Long
	Dim Hexed As String
	Dim X As Long
	Dim Y As Long
	Count = 0


	For X = 0 To P.Width Step P.Width \ 32


		For Y = 0 To P.Height Step P.Height \ 32
			Hexed = Right("00000" & Hex(P.Point(X, Y)), 6)
			Red = Red + CLng("&h" & Right(Hexed, 2))
			Green = Green + CLng("&h" & Mid(Hexed, 3, 2))
			Blue = Blue + CLng("&h" & Left(Hexed, 2))
			Count = Count + 1
		Next

	Next

	AverageRGB = RGB(Red \ Count, Green \ Count, Blue \ Count)
End Function

see? easy math through the use of RGB. Please note that this code is some three YEARS old and stop fawning over MS's shit.

actually i take it back, the code was made in 2002.



Lol, like down south there don't be gettin yall arguaments in none them knots, yall know I mean.
I must disagree by saying that it was a pretty slick achievement. Though that code has not been fitted to a certain project or application, it could probably be easily reconstructed.

But...I have to be honest and say:
Microsoft has outgrown MAC in their visual interface. I'm sorry, but I'm just not a Mac fan!


How do I install the above code?

Want to comment?

Register or Sign In to go completely ad-free!