Skip to content

Window chrome colors

The window chrome refers to the parts of a window that are drawn by the operating system rather than by the application itself. This typically includes the title bar, window borders and close/minimize/maximize buttons. These elements surround the main content area of the application and allow the user to move, resize, or control the window. Not to be confused with the Google Chrome web browser.

Example window

winaccent allows you to get some window chrome colors. You can do that using the following variables:

Variable Description
titlebar_active Returns the active title bar color
titlebar_active_text Returns the active title bar text color
titlebar_inactive Returns the inactive title bar color
titlebar_inactive_text Returns the inactive title bar text color
window_border_active Returns the active window border color
window_border_inactive Returns the inactive window border color

Here's an example for retrieving the colors:

import winaccent

print(f"Active title bar color: {winaccent.titlebar_active}")
print(f"Active title bar text color: {winaccent.titlebar_active_text}")
print(f"Inactive title bar color: {winaccent.titlebar_inactive}")
print(f"Inactive title bar text color: {winaccent.titlebar_inactive_text}")
print(f"Active window border: {winaccent.window_border_active}")
print(f"Inactive window border: {wintaccent.window_border_inactive}")

Note

If you want to obtain the dark mode window chrome colors, you will have to enable the dark_mode_titlebar flag. See dark_mode_window flag for more information.

Note

For checking if windows have colored title bars and borders, you can use the is_titlebar_colored boolean variable. See Colored title bars and window borders for more information.

Important

The window border color is translucent (except when the "Show accent color on title bars and window borders" option from Settings > Personalization > Colors is enabled). winaccent will return the window border color without opacity to prevent some issues.

Also, the window border color is actually slightly lighter than the title bar color on Windows 10 (only on Windows 11 it's the same).

Windows 10 colored title bar
Windows 10

Windows 11 colored title bar
Windows 11

Title bar and window border colors can also be customized from the registry:

Custom window colors

Warning

These variable might not return the right colors on systems that use custom themes or are heavily modified.