Skip to content

Instantly share code, notes, and snippets.

@theherk
Created September 3, 2020 13:46
Show Gist options
  • Save theherk/6e33534fc8b2a8ecce40dea89c58106c to your computer and use it in GitHub Desktop.
Save theherk/6e33534fc8b2a8ecce40dea89c58106c to your computer and use it in GitHub Desktop.
Windows 10 Title Bar Color Hack

When Windows is left to decorate the title bar, it can look undesirable, and there is no way to readily change it in the way I wanted. So based on a few sources, I've come up with the following solution.

In my case, the issue was the title bar for emacs, but it is the case for many applications.

These steps will allow the continued use of accent color, but set the title bar to a color of your choice.

Steps

  1. Set the accent color in the Personalization > Colors interface to the color you want the title bar.
  2. Under "Show the accent color on the following surfaces", select "Title bars and window borders"
  3. Open regedit. Observe the value at HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM for "AccentColor"
  4. Repeat steps 1 and 3 to get a second value for the inactive windows (optional).
  5. Set the accent color now to the value you actually want as your accent color (not the title bar color).
  6. Generate the .reg file.
  7. Run the .reg file.

note: Step 1 is just to generate the final value. It seems Windows does some calculation on this value.

My registry file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM]
"AccentColor"=dword:ff362a28
"AccentColorInactive"=dword:ff362a28

In my case, I'm using the same color for active and inactive. I use the dracula theme, so the background color is actually #282A36, but as you can see, I'm using ff362a28. I can't explain that, but there seems to be some translation going on under the covers, hence the runaround setting the accent color a few times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment