Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert intensity but leave green/red as-is #14

Open
gregorlarson opened this issue Oct 21, 2017 · 5 comments
Open

Invert intensity but leave green/red as-is #14

gregorlarson opened this issue Oct 21, 2017 · 5 comments

Comments

@gregorlarson
Copy link

gregorlarson commented Oct 21, 2017

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!

@koo5
Copy link

koo5 commented Oct 22, 2017

#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

@zoltanp
Copy link
Owner

zoltanp commented Oct 23, 2017

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.

@koo5
Copy link

koo5 commented Nov 8, 2017

im becoming convinced that one just gets used to it eventually (to the red/green in diffs)

@otto-dev
Copy link

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

@koo5
Copy link

koo5 commented Feb 10, 2022

apparently, gnome-shell is your friend now: DisplayLink/evdi#44 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants