How to change GTK3 color scheme on Ubuntu 13.04
The colors are customizable. But it depends on the theme you use. What I'm writing below does not apply to the Adwaita theme which is somewhat "locked down" because part of the code was in a binary the last time I looked.
Anyway, the following relates to other gtk2
and gtk3
themes. There's a tool available that will allow a certain extent of customization. It has been described by its developer in Customize GTK themes with GTK theme preferences.
To quote from there:
Customizing a GTK theme can be frustrating, especially with both GTK2 and GTK3 themes lying there. And why go through all the hassle when you want to change just few things. You no more have to! I've made a GTK theme configuration tool that allows anyone to change some basic elements of a GTK theme easily (both GTK2 and GTK3) with a simple interface.
It requires you to install a ppa
:
sudo add-apt-repository ppa:shimmerproject/ppa
sudo apt-get update
sudo apt-get install gtk-theme-config
Installing this software will allow you to customize quite a few things.
If you really want to fine-tune your theme, you may need to edit components of the theme yourself. These files will be found in the folder named after your relevant theme. Depending on how you've set things up, you may have to look in /usr/share/themes
or in ~/.themes
.
I prefer to have my themes in ~/.themes
because the changes will be user-specific and not system-wide (and you won't need sudo
). Putting your themes in ~/.themes
is a simple matter of creating the hidden folder .themes
and then copying over the entire theme folder from /usr/share/themes
. You may wish to rename the copied theme folder name to distinguish it from the other. Relevant files could include:
-
gtkrc
in thegtk-2.0
folder -
gtk.css
in thegtk-3.0
folder and -
gtk-widgets.css
also in thegtk-3.0
folder
(To edit these files you'll need a basic knowledge of CSS and how colors are described. Ideally, you'd would use a text editor that allows syntax highlighting. Gedit works fine for this purpose. And to notice the effect caused by any changes you make, you may have to switch to another theme and back or even log out and back in.)