Eclipse javadoc background color is black

JavaEclipseBackground ColorUbuntu 10.04

Java Problem Overview


My Eclipse javadoc view has a black background which makes it look terrible and partly unreadable (e.g. links are dark blue on black). Even worse, the javadoc popup has black background, too. I can't find the corresponding setting.

The answer by Sumit Singh showed me how to change the background for the javadoc view. However, I still see no way how to change the foreground. Even worse, the javadoc popup background color didn't change.

I don't think it's caused by a plugin, as it happens with a fresh install, too. This happens on Ubuntu 10.4. In Windows the colors can't be changed either, but there are fine.

Java Solutions


Solution 1 - Java

Window > Preferences > General > Appearance > Colors And Fonts > Java
> Javadoc View Background  

enter image description here

Solution 2 - Java

You need to change the 'Tooltip' color in Ubuntu at the OS level.

Solution 3 - Java

None of the answers here worked for me (I have Eclipse Mars and Ubuntu 14.04). I had to edit /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css. I've changed tooltip_bg_color to #f5f5bf# and tooltip_fg_color to #000000. After restarting eclipse, the change took effect.

Solution 4 - Java

As a KDE user you have to change the tooltip background color with systemssttings.
Navigate to

Application Apperearence -> Colors -> Colors
and adjust the Tooltip Background and Tooltip Text colors.

Solution 5 - Java

On ubuntu 12.10 (quantal) you can use the following two commands:

#foreground white => black
sudo sed -i s/tooltip_fg_color:#ffffff/tooltip_fg_color:#000000/g  /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
#background black => yellow
sudo sed -i s/tooltip_bg_color:#000000/tooltip_bg_color:#f5f5b5/g  /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

(Thanks to the other answers and this that helped me to figure this out)

Solution 6 - Java

Install the "GNOME Color Chooser" in Ubuntu (worked also on Xubuntu)

There you can set the Tooltip colors under the tab "Specific"

Solution 7 - Java

Had same issue with Neon on Ubuntu 16.04 Mate edition.

To fix it, I have created a small, user-specific GTK3 CSS settings file. It is stored as you HOMEDIR/.config/gtk-3.0/gtk.css

In my case, I compressed the spacing a bit, specified default font and also, set the appearance for the tooltip windows:

#####################
* {
    padding: 1px;
    font: Liberation Mono 12;
}

GtkToolbar {
    padding: 2px;
}

GtkMenuBar {
    padding: 2px;
}

GtkMenuItem {
    padding: 2px 6px;
}

.tooltip {
    background-color: #CAE1FF;
    color: #EEEEEE;
    text-shadow: none;
}
#########################

Solution 8 - Java

Please note, this issue has been resolved in Eclipse as of 8th November 2016. To have this fixed, please download one of the latest integration builds: http://download.eclipse.org/eclipse/downloads/
(The maintenance builds don't have the patch at the time of writing 2016-11Nov-09Wed).

I wrote a patch that introduced a new preference in Eclipse "Information Background/Text" under General -> Appearance -> Colors and Fonts. This preference generates the correct color on Linux/Gtk (White background, black text).
See: Bug 505738 – Define a information hover color which JDT, CDT or others can use https://bugs.eclipse.org/bugs/show_bug.cgi?id=505738

Subsequently I made Javadoc colors inherit it's color from that preference. See:
Bug 501742 – Default Javadoc text and background color should use colors consistent with Java editor background/foreground. https://bugs.eclipse.org/bugs/show_bug.cgi?id=501742

As an added bonus, it also works on the Dark Theme:
Bug 505851 – [Dark Theme] Style the HOVER_ colors for the dark theme https://bugs.eclipse.org/bugs/show_bug.cgi?id=505851

Solution 9 - Java

Also try this sudo apt-get install libwebkitgtk-1.0-0 after I installed the lib the javadoc looks so much better

> After installing brand new Eclipse, you may notice, that hover, which > shows javadoc comments, and Javadoc view render javadoc comments as a > plain text. Eclipse simply ignores all the @link and @see annotations. > Well, it's actually not the problem of view itself. The problem is > that default Eclipse browser is not working from the box in Ubuntu > 12.04. To make it works you need to install libwebkitgtk-1.0-0 package. Just type in the terminal:

source: http://ubuntu-user-tricks.blogspot.com/2012/09/3-things-to-do-after-installing-eclipse.html

Solution 10 - Java

I think the answer here to have a properly formattet tooltip (at least for people who use ubuntu and want to have a nice hover tooltip) with html elements like links working is to install libwebkitgtk as it is used by eclipse to show javadoc. It is not preinstalled on e.g. Ubuntu and does not come with eclipse.. use:

sudo apt-get install libwebkitgtk-1.0-0

and restart eclipse to have good looking tooltips.

Solution 11 - Java

You can change the color in
Windows->Preferences->general->Appearance .

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmaaartinusView Question on Stackoverflow
Solution 1 - JavaSumit SinghView Answer on Stackoverflow
Solution 2 - JavaDeepak AzadView Answer on Stackoverflow
Solution 3 - JavaRafi KamalView Answer on Stackoverflow
Solution 4 - JavaStefanQView Answer on Stackoverflow
Solution 5 - JavaAmanicAView Answer on Stackoverflow
Solution 6 - JavaDamocles_View Answer on Stackoverflow
Solution 7 - Javamr.magaView Answer on Stackoverflow
Solution 8 - JavaLeo UfimtsevView Answer on Stackoverflow
Solution 9 - JavaIsmail MarmoushView Answer on Stackoverflow
Solution 10 - JavatObiView Answer on Stackoverflow
Solution 11 - JavaVishnuView Answer on Stackoverflow