3.5 upgraded, text highlight color change

User Help for Mozilla Firefox
tjbinno
Posts: 15
Joined: April 7th, 2005, 12:30 pm

3.5 upgraded, text highlight color change

Post by tjbinno »

Upgraded to 3.5 and found that when you use "highlight all" button on find command the highlighted text color has changed to a reddish magenta instead of original yellow.

I tried it in safe mode also with all extensions off, so has nothing to do with extensions.

I tested a second computer with older version, highlight color was yellow. Updated to 3.5 on that system and highlight color was changed to a magenta. So has nothing to do with the Windows XP theme color settings or appearance settings.

Not a major problem, just an unexpected glitch that should be reset.
User avatar
kindofabuzz
Posts: 3859
Joined: July 20th, 2003, 1:13 am
Location: Memphis, TN
Contact:

Re: 3.5 upgraded, text highlight color change

Post by kindofabuzz »

Firefox has a "highlight all" button? I've never seen it.
Collapse unwanted MozillaZine forum sections ** Give a man a fish and he will eat for a day; teach a man to fish and he will eat for a lifetime; give a man religion and he will die praying for a fish.
User avatar
a;skdjfajf;ak
Posts: 17002
Joined: July 10th, 2004, 8:44 am

Re: 3.5 upgraded, text highlight color change

Post by a;skdjfajf;ak »

kindofabuzz wrote:Firefox has a "highlight all" button? I've never seen it.


Ctrl+F ? does not show a 'highlight all' ?
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Re: 3.5 upgraded, text highlight color change

Post by dickvl »

You can set the Highlight color by creating String prefs on the about:config page.
ui.textHighlightBackground
ui.textHighlightForground
ui.textHighlightForeground

ui.textSelectBackgroundAttention

(edit: no sure how it works as I'm seeing some weird colors)
(edit2: corrected wrong pref name to ui.textHighlightForeground)
Last edited by dickvl on July 2nd, 2009, 4:28 pm, edited 2 times in total.
User avatar
kindofabuzz
Posts: 3859
Joined: July 20th, 2003, 1:13 am
Location: Memphis, TN
Contact:

Re: 3.5 upgraded, text highlight color change

Post by kindofabuzz »

Littlemutt wrote:
kindofabuzz wrote:Firefox has a "highlight all" button? I've never seen it.


Ctrl+F ? does not show a 'highlight all' ?


Oh, never have paid attention to that.
Collapse unwanted MozillaZine forum sections ** Give a man a fish and he will eat for a day; teach a man to fish and he will eat for a lifetime; give a man religion and he will die praying for a fish.
Anonymosity
Posts: 8779
Joined: May 7th, 2007, 12:07 pm

Re: 3.5 upgraded, text highlight color change

Post by Anonymosity »

I believe the spelling in the setting needs to have an "e" in "Foreground".
ui.textHighlightForground should be ui.textHighlightForeground.
Is there any way to force the text colour for the text select attention setting?
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Re: 3.5 upgraded, text highlight color change

Post by dickvl »

Yes, that is correct.
ui.textHighlightForeground is the correct name.
Sorry for the typo (couldn't use copy & paste in the Hex editor).

I will edit my above post to correct it.
Anonymosity
Posts: 8779
Joined: May 7th, 2007, 12:07 pm

Re: 3.5 upgraded, text highlight color change

Post by Anonymosity »

Is there no way to set the text colour for ui.textSelect?
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Re: 3.5 upgraded, text highlight color change

Post by dickvl »

These are all the ui.text* prefs that you can try:
ui.textSelectBackground
ui.textSelectBackgroundAttention
ui.textSelectBackgroundDisabled
ui.textSelectForeground
ui.textBackground
ui.textForeground
ui.textHighlightBackground
ui.textHighlightForeground
tjbinno
Posts: 15
Joined: April 7th, 2005, 12:30 pm

Re: 3.5 upgraded, text highlight color change

Post by tjbinno »

Agree... Need some way to set text color for ui.textselect. My text turns white and is almost invisible.

At least I now have my old yellow highlights active.
Guest
Guest

Re: 3.5 upgraded, text highlight color change

Post by Guest »

I like the magenta. It's less commonly used in web pages, so it stands out more than yellow.
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Re: 3.5 upgraded, text highlight color change

Post by dickvl »

That looks like a problem with EnsureSufficientContrast
At some point the background and foreground get swapped
http://mxr.mozilla.org/mozilla-central/ ... s.cpp#3033
http://mxr.mozilla.org/mozilla-central/ ... s.cpp#3283
ui.textHighlightForeground;#000000
ui.textHighlightBackground;#a1a100
ui.textHighlightBackground;#a2a200

Code: Select all

data:text/html,<html><head><style>body{color:rgb(0,0,0);background-color:rgb(255,255,255);}</style></head><body height="100%">Find "Highlight All": test Test TEST</body></html>

ui.textHighlightForeground;#000000
ui.textHighlightBackground;#ffff00

Code: Select all

data:text/html,<html><head><style>body{color:rgb(255,255,255);background-color:rgb(114,114,114);}</style></head><body height="100%">Find "Highlight All": test Test TEST</body></html>

Code: Select all

data:text/html,<html><head><style>body{color:rgb(255,255,255);background-color:rgb(115,115,115);}</style></head><body height="100%">Find "Highlight All": test Test TEST</body></html>
User avatar
Frank Lion
Posts: 21178
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: 3.5 upgraded, text highlight color change

Post by Frank Lion »

*sigh* How do I get black text on yellow background for Highlight All?

I've done - pref("ui.textHighlightBackground", "#FFFF00");
pref("ui.textHighlightForeground", "#000000");

and get black background and yellow text. Swap them over and they are the same, WTF! :) ...I vaguely understand Dick's point about sufficient contrast - not.
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Re: 3.5 upgraded, text highlight color change

Post by dickvl »

Looks that this code can swap background and foreground colors (3000):
http://mxr.mozilla.org/mozilla-central/ ... s.cpp#2983

Code: Select all

2983 PRBool
2984 nsTextPaintStyle::EnsureSufficientContrast(nscolor *aForeColor, nscolor *aBackColor)
2985 {
2986   InitCommonColors();
2987
2988   // If the combination of selection background color and frame background color
2989   // is sufficient contrast, don't exchange the selection colors.
2990   PRInt32 backLuminosityDifference =
2991             NS_LUMINOSITY_DIFFERENCE(*aBackColor, mFrameBackgroundColor);
2992   if (backLuminosityDifference >= mSufficientContrast)
2993     return PR_FALSE;
2994
2995   // Otherwise, we should use the higher-contrast color for the selection
2996   // background color.
2997   PRInt32 foreLuminosityDifference =
2998             NS_LUMINOSITY_DIFFERENCE(*aForeColor, mFrameBackgroundColor);
2999   if (backLuminosityDifference < foreLuminosityDifference) {
3000     nscolor tmpColor = *aForeColor;
3001     *aForeColor = *aBackColor;
3002     *aBackColor = tmpColor;
3003     return PR_TRUE;
3004   }
3005   return PR_FALSE;
3006 }

I see the swap with these values
ui.textHighlightBackground: #A1A100 (still good)
ui.textHighlightBackground: #A2A200 (swap)

Just for fun (:LOL:) with ui.textHighlightBackground:#FFFF00
Set the browser.display.background_color:#707070 or less and use this style:
html {background-color:rgba(255,255,255,1)}
body {background-color:rgba(255,255,255,0.01)}

Code: Select all

data:text/html,<html><head><style>html {background-color:rgba(255,255,255,1)} body {background-color:rgba(255,255,255,0.01)}</style></head><body height="100%">Find "Highlight All": test Test TEST</body></html>


Pretty weird :lol:
Guest
Guest

Re: 3.5 upgraded, text highlight color change

Post by Guest »

Can someone please post *how* to get the nice yellow highlighting from previous Firefox versions back?
Locked