In a lot of applications the tooltips are just plain ugly (White text on black background, way too much contrast) or even unreadable (black or dark blue text (Hyperlinks) on black background). I want to change the background color of the tooltips to some medium gray or even some yellow or something like that, maybe even something semi-transparent.

Here is a screenshot of Eclipse which displays some source code in a tool tip with black text on black background:

Switching to a different theme (Something other than Ambiance or Radiance) helps but I like Ambiance and I want to keep it. It's just this darn tooltip color which is absolutely unacceptable.

I found several solutions for older Ubuntu versions but they no longer work with Unity in Ubuntu 11.10 because I can't find any function to customize the Ambiance or Radiance theme. So how do I do that in the current Ubuntu version?

(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.

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

@JJD: I'm usually against "thank you"-only comments, but your article is awesome. I noticed it uses the same approach as this answer. Since I already use a custom shell script to launch Eclipse from both command line and .desktop file, adding the GTK2_RC_FILES=... env is easy. Thanks :)
– MestreLionApr 2 '13 at 5:23

I think this one is solved. I got it showing the tooltip with black letters on white background. In my case, it seems that Eclipse is using settings fot tooltips from gtk-2.0/gtkrc file from theme directory.

Open the terminal, change to the theme directory (cd $HOME/.themes) and there, go to the directory of your theme. If your .themes direcotry if empty of it doesn't exist, then, you are using system theme which is in /usr/share/themes. Just figure out the name of the theme you are using (right click on bakcground, choose Change Desktop Background, the theme name should be in the lower right corner. If it says nothing about theme name, then use gnome-tweak-tool to find out which theme you are using).

In the theme directory, issue this command:

grep -r tooltip *

it should list all of the files and lines where keywork "tooltip" is mentioned. Change every background (tooltip_bg_color) to #ffffff and every foreground to #000000. Black latters on white foreground, this is what we want! Especially, change values in the gtk-2.0/gtkrc file.

Mistake I was doing, is chainging tooltip color in the gtk-3.0 directory, which didn't have any effect.

Now, go to the Eclipse, Window -> Preferences -> Java -> Editor and set Source Hover Background to the "System color" (check on the right). Restart the Eclipse!

This is listig of grep -r tooltip * from my theme directory after doing changes:

Like the new Reference: GtkSettings:gtk-color-scheme has been deprecated since version 3.8 and should not be used in newly-written code. Color scheme support was dropped and is no longer supported. You can still set this property, but it will be ignored.
– Alessandro D'lncalAug 19 '18 at 22:58

In Ubuntu 18.04 is not anymore valid. I tried to change it by dconf but with no results. In Ubuntu 18.04 you have to change the gtk-3.0 folder in .config putting your gtk.css file in order to take effect. You have to modify even the seettings.ini in that folder.
– Alessandro D'lncalAug 19 '18 at 23:19

I was having same problem (Xubuntu 12.04, Greybird theme, Eclipse Indigo) and Mihael K's answer worked for me.
The only file I changed was gtk-2.0/gtkrc and I only changed one line.
The third line after the initial comments. Changed the hex color values of tooltip_bg_color:#000000 to tooltip_bg_color:#ffffe1 and tooltip_fg_color:#ffffff to tooltip_fg_color:#000000. So the line will look like this:

A more user-friendly way to change the background is using the UI. Open System, Preferences, Appearance. By default "Ambiance" theme will be selected, but you can change it for any theme. Click on Customize button below and switch to Colors tab. There you can change foreground and background colors for tooltips by clicking on appropriate boxes.

On 11.10, this does not work. I can change the theme in Appearance, but there is no means to customize the theme.
– daniel kullmannNov 21 '11 at 11:10

I don't have 11.10 installed but I would find it weird if they have removed a way to customize a theme. Perhaps they have renamed the button and/or placed it in a different place/tab?
– Sergiy BelozorovNov 21 '11 at 16:19

Sergiy, many of us have searched but it looks like it's not there. We're hoping it will reappear in 12.04.
– user25656Dec 1 '11 at 11:35

Not anymore... after using 12.04 for a while, our admins are considering moving onto Fedora or some other RHEL-like distribution. Ubuntu has become a multimedia platform, which works well for home users, but not for the IT professionals.
– Sergiy BelozorovAug 28 '13 at 16:20

This answer is to point out a rare case where a very similar bug occurs if you have installed xulrunner and configured eclipse to use it.

I installed xulrunner to make the GPE Designer to properly render GWT UIs in the design mode, which worked very well but I found it also broke the tooltips. The bug is actually worse than the screenshot above, it just display a blank tooltip.

To fix it you only have to remove the xulrunner parameter from eclipse.ini:

-Dorg.eclipse.swt.browser.XULRunnerPath=/path/to/xulrunner/

It worked for me with Ubuntu 12.04, Eclipse 4.2/Juno and xulrunner 1.9.2

Go to /usr/share/themes/elementary/gtk-3.0, edit the file gtk-widgets.css with sudo nano, type Ctrl + W to find Tooltips, and then at the background-color: alpha(#color, #opacity) change the color to something like #f5f5b5 and set opacity to 1.

Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).