24

Sometimes I need to flip from a light colour scheme to a dark one quickly, and I need it to apply not just to the desktop theme but also to any webpages that are open etc.

On the Mac there's a neat shortcut for this (Cmd+Alt+Ctrl+8) - it simply inverts all colours displayed, so the screen looks like a photographic negative.

Is there an equivalent of this that I can use in my debian/ubuntu desktop sessions?

Dan Stowell
  • 655
  • 2
  • 5
  • 14
  • What Desktop Environment/Window manager do you use? Gnome? Unity? Cinnamon? – terdon Mar 24 '13 at 10:45
  • Thanks for the nudge - I'm using LXDE/Openbox, but I realise I was assuming the effect would happen lower down (in Xorg) - and there is an answer that does do this, hurrah. – Dan Stowell Mar 24 '13 at 22:07

3 Answers3

28

A window manager independent way is:

xcalib -invert -alter

From the xcalib man page

xcalib loads 'vcgt'-tag of ICC profiles to the X-server using the XVidMode Extension in order to calibrate your display.

You can install it using sudo apt-get install xcalib. To make it more convenient assign a keyboard shortcut to the command (e.g. Cmd+Alt+Ctrl+8).

Marco
  • 4,306
  • 1
  • 29
  • 31
  • It only inverts one of my two displays – Tristan Aug 12 '16 at 08:23
  • @TristanT use `-s 0` for first screen and `-s 1` for second. [See also](http://unix.stackexchange.com/a/328622/19062). – q9f Dec 09 '16 at 19:23
  • 1
    gotta be carefulnif you are using `redshift` https://superuser.com/q/874859/202217 – scjorge May 12 '17 at 19:42
  • Using redshift over here. All you've got to do after the blink is fire a `redshift -o` Also, I think xcalib may have been updated? Or is better compatible with some drivers. Works fine on all 3 of my connected displays. – Jonny Asmar Dec 20 '17 at 06:13
  • If you get "Error - unsupported ramp size 0", see https://askubuntu.com/questions/930084/xcalib-error-unsupported-ramp-size – sashoalm Sep 21 '18 at 06:30
  • `$ xcalib -invert -alter` `Error - unsupported ramp size 0` in fact produces this error for every option – Reb.Cabin Aug 17 '19 at 21:58
3

The following works on Pop-OS 21, which is an Ubuntu variant.

Settings > Accessibility > Zoom > Magnifier > Full Screen

enter image description here

Settings > Accessibility > Zoom > Color Effects > White on Black

enter image description here

Alt-Super-8

enter image description here

Reb.Cabin
  • 165
  • 8
  • 1
    This leaves a weird square trail behind my cursor, but otherwise works well. If someone knows how to use `xcalib` (or any other approach) in a way that doesn't affect my `xrandr` brightness settings, I'd love to hear! Until this is good enough - thanks! – joe Jan 09 '22 at 20:16
  • @joe I confirm the "weird square trail." Annoying but merely annoying in my opinion for ordinary work. Would be bad for a screencast. – Reb.Cabin Jan 16 '22 at 20:35
0

If you have Compiz, open CompizConfig Settings Manager and enable Negative. This will allow you to invert colors of a window (default shortcut is Super+n) or the whole desktop (default shortcut is Super+m).

Jan Warchoł
  • 209
  • 1
  • 9