debian/ubuntu - invert all colours in desktop session (colors)

21

7

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

Posted 2013-03-24T08:18:17.470

Reputation: 545

What Desktop Environment/Window manager do you use? Gnome? Unity? Cinnamon? – terdon – 2013-03-24T10:45:32.743

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 – 2013-03-24T22:07:48.437

Answers

25

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

Posted 2013-03-24T08:18:17.470

Reputation: 4 015

It only inverts one of my two displays – Tristan – 2016-08-12T08:23:53.087

@TristanT use -s 0 for first screen and -s 1 for second. See also.

– Afr – 2016-12-09T19:23:41.577

1

gotta be carefulnif you are using redshift https://superuser.com/q/874859/202217

– scjorge – 2017-05-12T19:42:48.263

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 – 2017-12-20T06:13:22.477

If you get "Error - unsupported ramp size 0", see https://askubuntu.com/questions/930084/xcalib-error-unsupported-ramp-size

– sashoalm – 2018-09-21T06:30:40.003

$ xcalib -invert -alter Error - unsupported ramp size 0 in fact produces this error for every option – Reb.Cabin – 2019-08-17T21:58:55.573

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ł

Posted 2013-03-24T08:18:17.470

Reputation: 210