xrandr-invert-colors
xrandr-invert-colors copied to clipboard
Invert intensity but leave green/red as-is
I use xrandr-invert-colors to reduce eye-strain at work. One of the things I do is review code-changes (diffs). Code-changes are often presented in color, with red indicating deleted lines, and green indicating added lines. I can fix the colors in xfce or gnome terminal to make green and red show correctly when inverted (i.e. for git diff, colordiff, vim-diff etc.). Problem: If it am viewing code diffs on a web-based tool (with firefox) it becomes more difficult to map colors. I can try stylish or user-scripts but these end of being difficult to maintain. Also, gui-tools like CLion, Eclipse etc also display code-diffs in color, and are more difficult to configure. Ideally, I would like a setting on xrandr-invert-colors which somehow inverts intensity (so I can browse with a dark background) but keeps green and red unchanged. Not sure this is even a sensible thing to do, but I wanted to get your opinion on if it would be possible. Thanks!
https://github.com/zoltanp/xrandr-invert-colors/issues/7 https://github.com/vn971/linux-color-inversion so, one could either hack on the X server, or suffer a compositing wm, or find/build a solution based on wayland
Just to elaborate a little bit:
In order to change only some colors, and not all of them, it would be needed to process the whole set of (R,G,B) color of a pixel; xrandr-invert-colors uses the RGB ramps for inverting colors, which means that it can only transform R, G, B values independently. Thus it is unable to distinguish between a white pixel (R=255,G=255,B=255) and a green one (R=0, G=255, B=0).
With compositors this color transformation should be possible; the links given by koo5 are nice.
im becoming convinced that one just gets used to it eventually (to the red/green in diffs)
im becoming convinced that one just gets used to it eventually
I've been using it a long time now, and I'm still not convinced.
Looking for a solution
apparently, gnome-shell is your friend now: https://github.com/DisplayLink/evdi/issues/44#issuecomment-1031713341