I\'ve been searching for about 40 minutes now and this is just so frustrating...
The standard search result background color in eclipse is freaking white and black. Ever
Old question but I will add my findings. I'm using a MacBook Pro
Using Eclipse Mars.1, while I do a 'text' search (using Emacs). To set the search highlight (or background) color I do the following:
Preferences->General->Editors->Text Editors
see the Appearance color options
section. Highlight the Selection background color
and use the color palette to set your desired color.
It is somewhat frustrating as the only way I could get this to work is to restart Eclipse. After the restart I am happy.
In the Eclipse menu bar: Windows->Preferences->General->Editors->Text Editors->Annotations
Then scroll down to "Search Results" and set the highlighted text color.
This works for Eclipse Helios and Eclipse Juno. I haven't tested other versions.
You can change search background color like this: (works for Luna and previous versions)
In the Eclipse menu bar: Windows->Preferences->General->Editors->Text Editors->Annotations Then scroll down to "Search Results" and set the highlighted text color.
If you mean (as I think you do) how do you change the highlight colour of strings that match what you select in an editor (e.g. you double-click on 'filename' and Eclipse highlights other references to 'filename' in a dull grey background), then the following post answers this: Eclipse: How do you change the highlight color of the currently selected method/expression?
In a nutshell, you want: * General -> Editors -> Text Editors -> Annotations * Look for "Occurrences" in the Annotation types list and change it from grey to your favourite colour!
I have also found, if you are looking at C++ code (at least in Eclipse Mars 2), changing the following option will set the highlight color of all occurrences of your current (or most recent) search, in case this is what you are looking for:
General->Editors->Text Editors->Annotations->C/C++ Occurrences
Why oh why this is not in the C++ preferences pane I will never know.
Same as @bityz's answer, except for me the annotation which mattered was "Occurrences". I tried this on Eclipse 4.3 Kepler.