-   Linux - General (
-   -   Invert Desktop Colors (

Cride5 07-26-2007 06:51 AM

Invert Desktop Colors [SOLVED]
Hi all, I spend a lot of time reading black on white, which just aint healthy on the eyes. I've tried turning down the brightness and using a dark theme, but none of these fixes were any good. The ultimate solution is to invert the screen colours, but my monitor can't do it and surprisingly, Linux doesn't seem to have any good packages for it.

I've tried gnome's 'magnifier' but although it can do it with...

magnifier --zoom-factor=1 --source-display=:0 -mfi
...its a bit messy, as the screen moves around and there is a giant crosshair in the way.

Does anyone have a better solution?

{BBI}Nexus{BBI} 07-26-2007 07:24 AM

Try your control centre and look under Appearance & Themes--> Colours. Click on the part(s) you want to change in the little display, then look under Widget Colour and click on the colour bar to bring up the colour pallette. There are also some pre-set colour schemes.

Simon Bridge 07-26-2007 07:25 AM

Beryl inverts the colors on a shortcut key.
Gnome has a "high contrast inverse" theme.

I imagine KDE has a tool - metacity is quite limited in some ways.

You can normally change the default background color on applications... my gudit screen is yellowed parchment colored and the terminal is grey-on-black.

The low-tech option is to wear tinted glasses.


Originally Posted by {BBI}Nexus{BBI}
Try your control centre and look unde

Gnome dosn't have a control center... the metacity theme manager dosn't have a color-pallet option - though you can fiddle the theme colors, it doesn't affect the reading space in text editors, terminals, pdf-readers and wordprocessors.

{BBI}Nexus{BBI} 07-26-2007 07:36 AM

I mean System Settings...

Cride5 07-26-2007 07:51 AM

Cheers for the feedback!

Sorry though, I should have said. I'm not a KDE user. I used to be, and did use a dark theme, but as Simon pointed out, a dark theme doesn't actually affect the reading space of most apps - Firefox for example).

At the moment I use Gnome, and the 'High Contrast Inverse' theme again only affects window decorations, menus etc. Not the reading space. A few apps, like Kpdf allow you to invert the colours, but I couldn't find that feature on some of the other ones. The most notable of which is Firefox. Firefox allows you to select different background colours, but it basically ruins the look of website. Inversion is a good solution because everything is inverted.

Using Beryl is a good fix, if you can get it to work. Alas, it keeps breaking on my poor Ubuntu machine :cry: - probably because its still in development and has a few bugs.

Are there any other inversion solutions out there??

{BBI}Nexus{BBI} 07-26-2007 08:17 AM

This doesn't solve your problem, but it seems this is an issue to be addressed, see here: Another low-tech option is to use a screen filter.

Cride5 08-15-2007 05:22 AM

Kay, after a bit of messing about I've found some great patches for gnome-mag, which I'm assuming will be packaged in the latest version at some point. In the mean time, download the sources for gnome-mag 0.14.4 and go here for the relevant patches:

(1) To enable gnome-mag to invert the screen, with zoom-factor 1 and no mouse follow:

(2) To enable control over the crosshair:

Assuming you have the right dependencies installed on your system you can then do:

$ cd dir_with_sources
$ ./configure
$ patch -p0 <patch_file
$ make
$ sudo make install

If that all goes well you can build an easy-to-use screen inversion script with the following


if echo "`pstree`" | grep -q "magnifier"
        killall -9 magnifier
        magnifier -fiz 1 &

And hay presto - I can invert my screen at the touch of a button! :D

anarkhos 09-27-2009 04:39 PM


And hay presto - I can invert my screen at the touch of a button! :D

Nice trick, it works almost perfectly. The one problem is the mouse-trail latency. I tried playing with the mouse-latency option, and didn't have any luck. Has anyone else got the mouse to work well with magnifier?

lumak 09-27-2009 06:01 PM

The problem with dark themes is generally websites that like to change the color of text when you type into a text box. But they don't bother to change the background. Then you end up trying to read something like darkblue on a gray background which is even harder on the eyes.

Fortunately, there is a firefox add-on called stylistic. It lets you set up global CSS definitions to override a web-page's theme. It may take some time to track down all the annoyances such as buttons or other objects defined in different ways, but at least you will be able to use a dark theme. The only problem is with the 'browse' button. This is a special button that firefox doesn't like to set any settings for.

BrainReaper 11-15-2009 04:22 AM


Originally Posted by Cride5 (Post 2837273)

magnifier --zoom-factor=1 --source-display=:0 -mfi
...its a bit messy, as the screen moves around and there is a giant crosshair in the way.

Does anyone have a better solution?

Just don't set the -m option and screen will keep fixed to upper left corner. -z 1 option ensures this is not a problem.


magnifier -z 1 -fi
This is what finally worked on my computer, thought it is a bit inefficient and slow. Hope it works for you too.

fault 04-13-2010 07:32 AM

I came here because i was looking for a simple solution to get an inverted X on the fly.

I found an easier solution for this elsewhere. Reference


/usr/bin/xcalib -invert -alter
if u dont find the tool in ur reps, the project page can be found on sourceforge. They also have prebuilt binaries for linux.

szilagyi 04-12-2011 01:15 PM

Thank you, fault! I have had the same question as Cride5 since having to use Firefox and Thunderbird daily, and also wondered, where is something like the Mac Invert Colors toggle? My eyes love you. (Actually, I had also been customizing themes in Gnome and Firefox, setting colors also in Thunderbird, installing Firefox add-ons like NoSquint, etc. So, my eyes were mostly OK, but it was a huge waste of time and an uphill battle.)

As search engine fodder, if anyone else is frustrated by Thunderbird's HTML rendering colors (similar black-on-white, hard-to-change situation), or, as others have mentioned here, the difficulty of getting some web sites to display readably, xcalib -i -a is a good solution. This is how you avoid fighting the entire world's default color scheme in every application and every web site. This is turning the right knob in the right place.

szilagyi 04-12-2011 01:54 PM

For any other Ubuntu users (probably any Compiz users), I note that this has been hiding right under my nose. Under System/Preferences/CompizConfig Settings Manager/Negative, you can enable a Compiz plugin that inverts colors for individual windows or the whole screen. The default key binding for the latter is S-m. (On my keyboard, and I believe usually, the Windows key is bound to Super.) So this winnage has been a keystroke away the whole time.

The documentation even points to xcalib -i -a and points out that Compiz needs certain OpenGL extensions to do this, whereas xcalib may work even when those OpenGL extensions aren't exposed to Compiz.

All times are GMT -5. The time now is 08:53 PM.