Ubuntu – GTK3 and GTK2 tooltip background color difference

14.04gtkgtk-2gtk3

I changed the tool tip background color setting in my current theme Ambiance for gtk-2 and gtk-3.0.

Even though I used the same color code #f5f5c5 the tool tip background color in eclipse and gedit(uses GTK3) and Firefox(which uses GTK2) are displayed differently.

See image

enter image description here

Please some one let me know the color code to be used for gtk-3.0 applications so that it looks same as shown in firefox?

GTK3 changes:

In /usr/share/themes/Ambiance/gtk-3.0/settings.ini:

[Settings]
gtk-color-scheme = "base_color:#ffffff\nbg_color:#f2f1f0\ntooltip_bg_color:#f5f5c5\nselected_bg_color:#f07746\ntext_color:#3C3C3C\nfg_color:#4c4c4c\ntooltip_fg_color:#000000\nselected_fg_color:#ffffff\nlink_color:#DD4814\nbg_color_dark:#3c3b37\nfg_color_dark:#dfdbd2"

In /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css:

….

@define-color tooltip_bg_color #f5f5c5;

@define-color tooltip_fg_color #000000;

….

GTK2 changes:

In /usr/share/themes/Ambiance/gtk-2.0/gtkrc file:

gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#000000\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F
0\ntooltip_bg_color:#ffffaf\nlink_color:#DD4814"

Best Answer

  • It looks to me like you're using different values for tooltip_bg_color in GTK2 and GTK3. In /usr/share/themes/Ambiance/gtk-2.0/gtkrc you have #ffffaf, while in /usr/share/themes/Ambiance/gtk-3.0/settings.ini and /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css you have #f5f5c5.

    If you want the lighter yellow (like your Firefox screenshot) in GTK3 apps, use #ffffaf in /usr/share/themes/Ambiance/gtk-3.0/settings.ini and /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css.