Is it possible to make the color of the title bar of the active window different from the rest?

Right now it's black for all windows in my default set-up. I am unable to determine if I can start typing as I don't know which the focused window is.

  • Maybe someone will find that useful: for Ubuntu 20.04 I've forked and modified the original yaru theme, just clone github.com/trozen/yaru and follow install instructions in CONTRIBUTING.md
    – trozen
    Commented Apr 29, 2020 at 8:32

4 Answers 4


This works for me (Ubuntu 18.04 + Gnome 3.28.1):

nano ~/.config/gtk-3.0/gtk.css

To customize the active title bar background colors use .titlebar and .backdrop (for inactive windows).

.titlebar {
    background: #3089FF;

.titlebar:backdrop  {
    background: #777777;

After saving the file, remember refresh gnome using this command:

setsid gnome-shell --replace
  • 4
    I also had a gtk-4.0 folder here, however putting it in there has no effect, 3.0 is the way to go. Thanks! You can also restart gnome shell with Alt+F2 and then typing 'r'
    – JonnyRaa
    Commented Jun 19, 2019 at 12:05
  • 5
    To avoid any misunderstanding, on Ubuntu 18.04.1, the file ~/.config/gtk-3.0/gtk.css did not exist. You have to create the file. The configuration above does paint the active title bar (the window that has the focus) in a nice blue and the not active in grey. The text is in white. It is a good solution and IMHO better than replacing the theme Ambiance by Adwaita. Certainly a question of taste. Commented Jan 14, 2020 at 10:06
  • @Wonko the Sane, the color of the title bar of the file manager (Nautilus) does not change and it is of course annoying. Commented Jan 14, 2020 at 10:08
  • @RudyVissers Agreed. Perhaps someone who works on the Nautilus project can assist with that. Commented Jan 31, 2020 at 13:43
  • This trick worked. Thanks a lot.
    – Puspam
    Commented Feb 25, 2020 at 12:55

A very simple way to make the color of the title bar different, is to choose a different theme, that does take this aspect into account (why the default one doesn't, beats me).

To change the default theme, install Gnome Tweaks (sudo apt install gnome-tweaks), then choose a theme like Adwaita:

Gnome Tweaks change theme

  • not an answer on the question Commented May 13, 2023 at 16:31

To expand on other answers that suggest editing ~/.config/gtk-3.0/gtk.css.

In Ubuntu 22.04 I had to use three separate selectors to get it working in the Settings app, the text editor and Nautilus.

.titlebar works for Nautilus. headerbar works for Settings. UnityDecoration.top works for the text editor. The inactive (backdrop) style works with just two selectors.

.titlebar, headerbar, UnityDecoration.top {
    background: #0567b8;

.titlebar:backdrop, headerbar:backdrop {
    background: #333333;

Not really a different answer but I found these colours more aesthetically pleasing under the ambience theme. I used gPick to make them match the rest of the theme (except the colours). Unfortunately you can't just leave them blank and have system defaults - that first one just applies in all cases without the second one.

This didn't work for all windows (notably chrome + some config windows) until after restarting, not sure why. Just reloading gnome shell wasn't enough.

.titlebar {
    background: #1856dd;

.titlebar:backdrop  {
    background: #3E3D3A;

Interestingly if you leave out the 'color' bits of those, gnome shell restarts much more quickly (even if you replace white with #FFFFFF). I don't see any errors in syslog or anything obvious in journalctl so not sure why.

Without setting white it looks a bit nasty, so I added it back in!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .