How to change tooltip background color in Unity?

Install and open gnome-color-chooser Install gnome-color-chooser.

Go to SpecificTooltips and put black foreground over pale yellow background.


Found it!

I had to edit these files:

/usr/share/themes/Ambiance/gtk-3.0/settings.ini
/usr/share/themes/Ambiance/gtk-3.0/gtk.css
/usr/share/themes/Ambiance/gtk-2.0/gtkrc

(Addition: for Ubuntu 12.04, it seems youjust have to modify the file: /usr/share/themes/Ambiance/gtk-2.0/gtkrc , replacing the tooltip backround and foreground color, with the #000000 and the #f5f5b5 color, respectively)

You require root privileges to edit the files. Use gksudo gedit to edit them.

Search for tooltip in these files and you'll find the color definitions for the foreground and the background. I use #000000 as foreground and #f5f5b5 as background and now the tooltips in all applications are again readable. After changing the color values simply switch to some other theme and then back to Ambiance and the tooltip color is now fixed.

Here is the result:

Eclipse with customized theme


If you want to change the tooltip colors for all apps then install and run gnome-color-chooser and go to Specific tab > Tooltips. Check the boxes for Foreground and Background and choose colors.

How it works (you can do this manually):

gnome-color-chooser adds the following to your ~/.gtkrc-2.0:

include ".gtkrc-2.0-gnome-color-chooser"

and ~/.gtkrc-2.0-gnome-chooser:

style "gnome-color-chooser-tooltips"
{
  bg[NORMAL] = "#FFFFAF"
  fg[NORMAL] = "#000000"
}
widget "gtk-tooltip*" style "gnome-color-chooser-tooltips"

If you just want to change the tooltip colors for a single app, such as eclipse, then put the above text into a custom gtkrc file (e.g. ~/gtkrc-eclipse) and start eclipse with GTK2_RC_FILES=~/gtkrc-eclipse eclipse

Tags:

Themes

Unity