Ubuntu – What file I need to edit to change the text color in a theme

gtkthemesunity

After upgrading to Ubuntu 11.04 (from 10.10) with Unity, and after I've been messing around with the (gtk, I guess?) theme a little, I've encountered a little problem.

In my panel (the one with the systray) all text are gray, the same goes on for all my right click menus and so on. After googleing I've found out that I need to change the text[normal] (or something like) variable in my GTK theme. Please correct me if I'm wrong.

I've also found out that I need to edit a file in my theme /usr/share/themes/<theme-name>

But which file, and where in the file?
Needs to be changed to black. (Can I use hex codes, ex.: #000000 ?)

Actually I see that the text in my right click menu is black when an option is disabled. I actually need to switch those two colors – in order to get everything right. Correct?

Thanks alot!

Best Answer

If the theme is a system theme (installed by default), you can find it in the /usr/share/themes/ directory. So for example if it is Ambiance, you will find it in /usr/share/themes/Ambiance/gtk-2.0/gtkrc file.

If you have installed it on user mode you can probably find the theme in ~/.themes/ directory. Then go to the relevant themes gtk-2/0 and open the gtkrc file.

At the top you might find a line as gtk-color-scheme =. There you can find the text colors.

But one can also change the color from right-click on desktop, them change background. Then under Theme tab select Customize and then after selecting the relevant theme, go to colors tab. Here you can change the text colors.