Invert Colors (Darken Websites)

By Invertion Last update Feb 18, 2012 — Installed 10,586 times.

Script Summary: Inverts the HTML colors of webpages for comfortable reading. Since many websites are bright or have a white background, this will make their background darker and text brighter which is much easier to read and causes less stress to the eyes.

NOTE: Be sure to follow the instructions to have the script run in desired websites.

This script will darken bright webpages as can be seen in the before/after screenshots.
It doesn't set a predefined dark color for background and bright color for text. Instead, It inverts all colors of the page so the resulting look stays loyal in colors to the original.

To have the script automatically run on websites of your choice:

1) Enter the "Manage User Scripts..." in the Greasemonkey GUI.
2) Click the "Options" button near the script's name.
3) Edit the "Included Pages" list.
For example, to have the script run automatically on all pages in, type the entire address with an asterisk at the end like this:*

Alternatively, it's possible to have the script automatically run on all websites and just edit the "Excluded Pages" list for websites that you don't want it to run on.
To do this change the line in the script:
"// @include"
"// @include *"
without the quotation marks of course.

The code in this script is based on the code of "invert lightness" bookmarklet that can be found here:
The Javascript code was converted from the one line bookmarklet to a Greasemonkey and was formatted to be readable.