switching background color easily

User Help for Mozilla Firefox
Post Reply
dushan
Posts: 27
Joined: June 12th, 2007, 1:51 am

switching background color easily

Post by dushan »

In both Firefox and SeaMonkey I (almost) always use my own background color (pale gray) to save my eyes from the usual bright white which hurts my eyes. This works fine most of the time, but there are some instances in which it eliminates important parts of the page being viewed. For instance, looking at an item description on the Amazon site, on the right hand side under "Quantity" the "Add to Cart" button is invisible (the area is the same color as the rest of the background).

In Preferences -> Appearance -> Colors (I'm using SeaMonkey at the moment) the option "Use my chosen colors, ignoring the colors and background image specified" was checked. If this is switched to "Always use the colors and background specified by the web page", the background switches to white and the missing button appears in a mustard color. Interestingly, below the "Add to Cart" button is a box with a mustard-colored "Add to Wish List" button. That box and button are visible even when I'm using my own background color.

My questions:
* why does specifying a background color blot out some parts of a page
but not others?
* is there an add-on or other shortcut (keyboard?) to switch easily between
the two options mentioned above?

Thanks.

- Dushan
Anonymosity
Posts: 8779
Joined: May 7th, 2007, 12:07 pm

Re: switching background color easily

Post by Anonymosity »

You could use a bookmarklet to change the colours if your preset colour scheme is not working on a certain page. There is a bookmarklet here called "Darken" that changes the colours of the background, main text, and links.
http://lifehacker.com/259456/invert-web ... ookmarklet

In my copy, I changed the code in that one slightly to modify the text colour to oldlace instead of lightgray, the link colour to #4488FF and the visited link colour to #FF1AFF because that makes those easier to read.
gordons gecko
Posts: 413
Joined: February 11th, 2010, 12:27 pm

Re: switching background color easily

Post by gordons gecko »

is there an add-on or other shortcut (keyboard?) to switch easily between
the two options mentioned above?


PrefBar:

http://prefbar.mozdev.org/

Works on both Firefox and SeaMonkey
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: switching background color easily

Post by patrickjdempsey »

dushan wrote:* why does specifying a background color blot out some parts of a page
but not others?


Simply put, because everyone builds their website differently. Often there are elements floating over top of the main HTML background that appear blank but have a background color added to them. Sometimes there are background images in those elements as well. I spent some time building a little app for changing background colors and text colors of web-pages and I can tell you for sure, there is no "easy" way to do it and still maintain most of the web content. There are some extensions that strip all of the content out of the page and show just the text, but these make page navigation nearly impossible. You can check out my little app here:

https://addons.mozilla.org/en-US/firefox/addon/116886/

It's only for Firefox so far, and is still in development although I haven't made any updates in awhile.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
dushan
Posts: 27
Joined: June 12th, 2007, 1:51 am

Re: switching background color easily

Post by dushan »

[quote="gordons gecko"]
[quote]is there an add-on or other shortcut (keyboard?) to switch easily between the two options mentioned above?[/quote]

PrefBar:

http://prefbar.mozdev.org/

Works on both Firefox and SeaMonkey[/quote]

Thank you! I installed this and it does just what I had in mind, and much more.
Great add-on: efficient, compact, and useful.

- Dushan
dushan
Posts: 27
Joined: June 12th, 2007, 1:51 am

Re: switching background color easily

Post by dushan »

[quote="Anonymosity"]You could use a bookmarklet to change the colours if your preset colour scheme is not working on a certain page. There is a bookmarklet here called "Darken" that changes the colours of the background, main text, and links.
http://lifehacker.com/259456/invert-web ... ookmarklet

In my copy, I changed the code in that one slightly to modify the text colour to oldlace instead of lightgray, the link colour to #4488FF and the visited link colour to #FF1AFF because that makes those easier to read.[/quote]

Thanks for this suggestion. I'll take a look at it, tho it seems to affect individual pages rather than everything that appears in the browser window.

- Dushan
dushan
Posts: 27
Joined: June 12th, 2007, 1:51 am

Re: switching background color easily

Post by dushan »

[quote="patrickjdempsey"
][quote="dushan"]* why does specifying a background color blot out some parts of a page but not others?[/quote]

Simply put, because everyone builds their website differently. Often there are elements floating over top of the main HTML background that appear blank but have a background color added to them. Sometimes there are background images in those elements as well. I spent some time building a little app for changing background colors and text colors of web-pages and I can tell you for sure, there is no "easy" way to do it and still maintain most of the web content. There are some extensions that strip all of the content out of the page and show just the text, but these make page navigation nearly impossible. You can check out my little app here:

https://addons.mozilla.org/en-US/firefox/addon/116886/

It's only for Firefox so far, and is still in development although I haven't made any updates in awhile.[/quote]

Thanks for the explanation. Is your app anything like the 'Readability' add-on available for Safari? Anyway, I'll take a look at it to see what it does.

- Dushan
Anonymosity
Posts: 8779
Joined: May 7th, 2007, 12:07 pm

Re: switching background color easily

Post by Anonymosity »

I have never found any such thing for Safari. I ended up using bookmarklets for a long time. Finally, I set up a stylesheet (similar to userContent.css for Firefox) to change the colour layout of all pages accessed with Safari. I still sometimes need to use a bookmarklet to change colours because of a mismatch with the text colours and the background. How is it that sites can still change the text colour and override your own setting, anyway? My code for the Safari content stylesheet is this:

Code: Select all

/*
 * This file can be used to apply a style to all web pages you view
 * Rules without !important are overruled by author rules if the
 * author sets any.  Rules with !important overrule author rules.
 */
/*body { font-size: 100% ! important; }*/

/* image buttons */
input[type="submit"] {
  background-color: rgb(132,132,132) !important;
    font-size: medium !important;
}

input[type="button"] {
  background-color: #848484 !important;
}

a[href^="javascript:"] {cursor: move;}

/* Change cursor for links that open in new window */
:link[target="_blank"], :visited[target="_blank"],
:link[target="_new"],   :visited[target="_new"] {
   cursor:  crosshair;
}

select {height: auto !important;}

/* Force text wrap */
pre { white-space:-moz-pre-wrap }

a:visited {background-color:#B0FFA0; color:#990099 !important;}
/*This line makes links red on hover.*/
a:hover {background-color:#80FFFF !important; color:rgb(255,0,0) !important;}

div.back2top {height: auto !important;}

body {background-color: #80EF90 !important; color: black !important;}
table,td {background-color: #EFBA99 !important; color: black !important;}
div {background-color: #B0B0B0 !important; color: black !important;}
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: switching background color easily

Post by patrickjdempsey »

Anonymosity wrote:How is it that sites can still change the text colour and override your own setting, anyway?


Some text, especially links and lists need to be given specific instructions for colors, and in some cases what appears to be text is actually image links which of course cannot be changed.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
Anonymosity
Posts: 8779
Joined: May 7th, 2007, 12:07 pm

Re: switching background color easily

Post by Anonymosity »

In this case, though, it is more of a problem for normal text in tables. I set the background to be a light colour and the text to be black, using the '!important' attribute, but sometimes the text gets changed to white regardless. In that case, I need to use a bookmarklet to change the colours.
Post Reply