Eee 701 Planetoid


Quick tip: invert colours on a Linux X11 display

Filed under: Linux, Software — Tags: , , , — Tim @ 17:33

One feature I have set up (and find very useful) on my iPhone, is a triple-press on the “home” button to invert the colours on the screen. (I won’t go into details on how to do this in iOS—it’s not the purpose of this post—but basically, look in Settings > General > Accessibility for details.) This is really handy for moments when you just don’t want to look at a very white screen (and unfortunately, iOS7 has lots of those), and a triple-press will turn white to black, to spare one’s eyes, blushes, etc…

I wondered if there was a not-too-complex way to set up a similar feature on a Linux machine, preferably at the X11 level (i.e. not tied into a particular window manager or desktop environment), and a quick Google search revealed I was in luck.

In short, there’s an command-line utility called xcalib, which is mainly intended for monitor calibration, but which has a handy feature: yes, it can invert the current X display’s colours (effectively, giving you a negative of the display). The program isn’t included in Arch Linux’s main package repositories, so you’ll have to build/install xcalib from the AUR—it’s a tiny program, so that will barely take you longer than installing it from a repo would.

Once the program is installed, running

xcalib -i -a

(for “invert” and “action”—i.e. “do it”) will invert your display’s colours; running the same again will switch it back.

Very useful, and even more so if you assign it to a keyboard shortcut—each DE and WM has its own way of setting this up, but in Xfce you do this in Xfce menu > Applications > Settings > Keyboard > Application Shortcuts [tab]. I used Ctrl-Alt-I (for “invert”), but that’s just personal taste 🙂

Maybe this feature is already present in some DEs, but at least this one will work in any environment—hope it helps you too!


1 Comment »

  1. nice, very handy.

    Comment by marcus — 2016/06/09 @ 13:29

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: