Check color of title bar on gui Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
gamergames

Check color of title bar on gui  Topic is solved

14 Dec 2017, 17:58

is there a way to check the background color of the gui title bar? how about the text color of the titlebar?
User avatar
boiler
Posts: 16902
Joined: 21 Dec 2014, 02:44

Re: Check color of title bar on gui

14 Dec 2017, 18:43

This may not be the definitive approach, but it will get you the info.

To get the default active title bar color (must be later Windows version than XP):

Code: Select all

SetFormat, Integer, Hex
RegRead, BgCol, HKEY_CURRENT_USER, Software\Microsoft\Windows\DWM, AccentColor
MsgBox, %BgCol%
The first two digits of the hex code are the transparency level (FF = fully opaque, 00 = fully transparent). The remaining 6 digits are the color in BGR format.

If you need to know the actual title bar color of a particular window, you could use PixelGetColor.

The text color is something that is something that is not stored in the registry since Windows changes it depending on background (may be white, black, grey). You could use PixelGetColor to try to get the text color, but due to anti-aliasing, it would not be easy to determine the base color.
gamergames

Re: Check color of title bar on gui

14 Dec 2017, 19:16

boiler wrote:This may not be the definitive approach, but it will get you the info.

To get the default active title bar color (must be later Windows version than XP):

Code: Select all

SetFormat, Integer, Hex
RegRead, BgCol, HKEY_CURRENT_USER, Software\Microsoft\Windows\DWM, AccentColor
MsgBox, %BgCol%
The first two digits of the hex code are the transparency level (FF = fully opaque, 00 = fully transparent). The remaining 6 digits are the color in BGR format.

If you need to know the actual title bar color of a particular window, you could use PixelGetColor.

The text color is something that is something that is not stored in the registry since Windows changes it depending on background (may be white, black, grey). You could use PixelGetColor to try to get the text color, but due to anti-aliasing, it would not be easy to determine the base color.
thank you, too bad i made a mistake in my title and message, I meant to say to change the color not check :facepalm:
User avatar
boiler
Posts: 16902
Joined: 21 Dec 2014, 02:44

Re: Check color of title bar on gui

14 Dec 2017, 20:29

You can use RegWrite to change that value directly. Be careful when writing scripts that change the registry, though.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Giresharu, inseption86, jomaweb, KruschenZ, mikeyww, Rohwedder and 280 guests