MozillaZine

Changing highlight color for text find

User Help for Mozilla Firefox
greywolf0
 
Posts: 6
Joined: December 3rd, 2005, 1:51 am

Post Posted August 18th, 2009, 2:53 am

When you press ctrl+f and find a search term, it is highlighted in neon green. Is there a way to change this color? Also, from reading another thread, there is supposed to be a ui.text options in the about:config but when I search for it, I come up with nothing.

Gingerbread Man

User avatar
 
Posts: 7742
Joined: January 30th, 2007, 10:55 am

Post Posted August 18th, 2009, 3:18 am

Actually, it depends on the background color. There's an exceedingly detailed explanation at ff 3.5 beta pink highlight text?? :S

No, those preferences are not supposed to be there. If you want them, you have to add them.
  1. Type about:config in the address bar and press Enter.
  2. Press the big button to bypass the warning.
  3. Right-click somewhere in the lower pane and choose New > String.
  4. As preference name use ui.textSelectBackgroundAttention and as the preference value use either a named color or hex color value.
  5. There are also other preferences you can set:
    • ui.textHighlightBackground
    • ui.textHighlightForeground
    • ui.textSelectBackground
    • ui.textSelectForeground

greywolf0
 
Posts: 6
Joined: December 3rd, 2005, 1:51 am

Post Posted August 18th, 2009, 10:30 am

Thank you Jesus! People on yahoo answers and other forums are idiots.

Anonymosity
 
Posts: 8523
Joined: May 7th, 2007, 12:07 pm

Post Posted August 18th, 2009, 2:47 pm

There is something strange about these settings:
ui.textSelectBackground
ui.textSelectForeground
If I set the background to yellow and the foreground to black, I get yellow text on a black background. If I switch the colours, I still get yellow text on a black background.

greywolf0
 
Posts: 6
Joined: December 3rd, 2005, 1:51 am

Post Posted August 19th, 2009, 3:15 am

I had another related question. I am using windows xp and in display options->appearances->advanced, I set the window background color to black and the window text to white. Now all my folders have a black background and filenames are white. This causes problems with programs that use those colors as default. In firefox, the tab text has turned white and form field text like the one you type into on the frontpage of google has turned white. The text in the tools->options of firefox has also turned white, except for the top part where the option categories are highlighted in black so you can read the white text. I know this is all normal for firefox, but is there a way to override the windows system colors I had changed above specifically for just firefox? I basically want to keep my black background folders but don't want to screw up firefox in the process.

Gingerbread Man

User avatar
 
Posts: 7742
Joined: January 30th, 2007, 10:55 am

Post Posted August 19th, 2009, 4:38 am

greywolf0 wrote:I set the window background color to black and the window text to white.

You can see what a terrible idea that is right in the preview: you have to deal with white text on a gray background.
Image

I've wasted my time painstakingly finding the right elements to edit. Put this in your userChrome.css, below the @namespace line. It will change most elements, not all. If there's anything omitted you want changed, post back here, but really, the sane thing to do is switch to an alternate theme, e.g. Past Modern or Silvermel.
Code: Select all
/* Black text for most interface elements */
.paneDeckContainer,
statusbarpanel,
.tab-text,
#personal-bookmarks .toolbarbutton-text,
#CookiesDialog label,
#PermissionsDialog label,
#PermissionsDialog description,
#changemp description,
#changemp caption,
#changemp label,
description[id="info.body"],
#SignonViewerDialog label,
#SignonViewerDialog description,
#paneAdvanced label,
#paneAdvanced caption,
#connectionGroup description,
#certificatesGroup description { color: black }

To fix web pages, put this in your userContent.css. If anything is omitted, post back with the URL to the page.
Code: Select all
input[type="text"], input[type="password"], textarea, option { background-color: white; color: black }

@-moz-document domain(google.com), url-prefix(http://www.google.) {
input[title="Google Search"] { background-color: white; color: black }
}

Anonymosity
 
Posts: 8523
Joined: May 7th, 2007, 12:07 pm

Post Posted August 19th, 2009, 2:14 pm

There is one more setting that was not mentioned:
ui.textSelectBackgroundAttention
That is the colour used by the Next button in the Find bar.
Setting these:
ui.textSelectBackground
ui.textSelectForeground
switched the background & foreground colours around for that setting.

With Mac Firefox, the ui.textSelectBackgroundAttention setting leaves the text colour alone, but with Windows Firefox, the text colour is changed to white.

Gingerbread Man

User avatar
 
Posts: 7742
Joined: January 30th, 2007, 10:55 am

Post Posted August 19th, 2009, 2:34 pm

Anonymosity wrote:There is one more setting that was not mentioned:
ui.textSelectBackgroundAttention

Gingerbread Guy wrote:As preference name use ui.textSelectBackgroundAttention and as the preference value use either a named color or hex color value.

Anonymosity
 
Posts: 8523
Joined: May 7th, 2007, 12:07 pm

Post Posted August 20th, 2009, 2:05 pm

Sorry I missed that. I would like to know why setting the ui.textSelect for background and foreground has such weird results, though.

greywolf0
 
Posts: 6
Joined: December 3rd, 2005, 1:51 am

Post Posted August 27th, 2009, 4:48 pm

Sorry to bother you again. that ui.textSelectBackgroundAttention did the trick in making the find text highlight black, but I screwed something up somewhere and now I can't fix it. When the value of ui.textSelectBackgroundAttention is set to "black", anything I search for will have white highlight and white text, like a white-out effect. When I set it to "000000", the text turns white but there is no highlighting. However, all the other colors work fine. I have it set to "purple" right now, which is the closest named color I can get to black. I've tried deleting my prefs.js file as well as deleting my preferences through safe mode. It will revert back to that neon greenish color, but once I add the ui.textSelectBackgroundAttention into about:config, the white-out effect shows up again.

Return to Firefox Support


Who is online

Users browsing this forum: MozillaMonkey and 10 guests