How to change highlight color

User Help for Mozilla Firefox
Post Reply
LeeU
Posts: 71
Joined: January 30th, 2004, 2:25 pm

How to change highlight color

Post by LeeU »

When I use Firefox v82 I get a dark blue highlight on web pages, URL bar, etc. How to I change this?
morat
Posts: 6436
Joined: February 3rd, 2009, 6:29 pm

Re: How to change highlight color

Post by morat »

Here is how to change the urlbar.

Code: Select all

/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

#urlbar html|input#urlbar-input::selection {
  background-color: peachpuff !important;
}
http://kb.mozillazine.org/UserChrome.css

Remember to set the toolkit.legacyUserProfileCustomizations.stylesheets preference to true, then restart.

P.S.

The selection process on a web page is more complicated.

The highlight color varies after doing a select all (ctrl+a) command on the following page.

HTML Color Names
http://www.w3schools.com/colors/colors_names.asp
LeeU
Posts: 71
Joined: January 30th, 2004, 2:25 pm

Re: How to change highlight color

Post by LeeU »

That worked great! I just wished I could change the other highlight. I seem to remember doing it before but have forgot (or maybe I didn't).
morat
Posts: 6436
Joined: February 3rd, 2009, 6:29 pm

Re: How to change highlight color

Post by morat »

You won't see the selection on a pink page with the following style.

Code: Select all

/* Firefox userContent.css */

::selection {
  -moz-appearance: none !important;
  color: red !important;
  background-color: pink !important;
}
http://kb.mozillazine.org/UserContent.css
LeeU
Posts: 71
Joined: January 30th, 2004, 2:25 pm

Re: How to change highlight color

Post by LeeU »

Bingo! That's it! Only I changed the background color to khaki and the color to black. Many thanks!
morat
Posts: 6436
Joined: February 3rd, 2009, 6:29 pm

Re: How to change highlight color

Post by morat »

You can also use the following preferences.

* ui.textSelectBackground
* ui.textSelectForeground

Reference
http://searchfox.org/mozilla-release/se ... Background
Post Reply