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

mention xcalib as an alternative #7

Closed
vn971 opened this issue Mar 18, 2015 · 7 comments
Closed

mention xcalib as an alternative #7

vn971 opened this issue Mar 18, 2015 · 7 comments

Comments

@vn971
Copy link

vn971 commented Mar 18, 2015

Hi!
Sorry, this is not an issue in the pure sense of the word. Instead I want to mention an alternative, xcalib. Example usage:

xcalib -i -a

You may note, if you wish, this alternative in README. Initially, I found your project with the desire to invert colors by "value" (along with hue/saturation). Had to read the source code and install to make sure what your program does exactly.

@vn971 vn971 changed the title mention xcalib as an alternative mention xcalib as an alternative Mar 18, 2015
zoltanp added a commit that referenced this issue Mar 19, 2015
@zoltanp
Copy link
Owner

zoltanp commented Mar 19, 2015

Hi, I've added to the readme file xcalib as alternative program. Actually I've created this utility because xcalib has not been working on my dual-monitor setup: it would invert the colors of a single (random) monitor, but not both.

Should I close this issue?

@lkraav
Copy link

lkraav commented Mar 19, 2015

Yeah @zoltanp that's exactly where xcalib failed for me. Tyvm for creating xrandr-invert-colors.

When patching documentation, perhaps we should also include a note about things like redshift, that vary screen color temperature throughout the day. It will immediately reset whatever xcalib-invert-colors tries to do.

@zoltanp
Copy link
Owner

zoltanp commented Mar 19, 2015

@lkraav Redshift is already in acknowledgements, because I've reused some code from it. If you have ideas for improving the documentation, proof-of-concept text, patches, pull requests are all welcome.

@vn971
Copy link
Author

vn971 commented Mar 19, 2015

Ah, I didn't know about this and that's interesting to know. Thanks!

@vn971 vn971 closed this as completed Mar 19, 2015
@vn971
Copy link
Author

vn971 commented Mar 19, 2015

@zoltanp a question not related to this issue. Since you seem to understand the Xserver architecture in some depth, could you also know a way to invert colors by "value" (keep the color but invert "brightness")? I tried to explain what I want here:

https://superuser.com/questions/742338/invert-screen-colors-by-value

@zoltanp
Copy link
Owner

zoltanp commented Mar 20, 2015

@vn971 I have only basic knowledge about the functioning of the Xserver; for the xrandr-invert-colors I've just copied/adapted what redshift does: modify the gamma look-up tables.

This is where the new gamma tables are generated:

https://github.com/zoltanp/xrandr-invert-colors/blob/master/xrandr-invert-colors.c#L197

This is where the new gamma tables are applied:

https://github.com/zoltanp/xrandr-invert-colors/blob/master/xrandr-invert-colors.c#L201

The gamma tables have a length, and they consist of a 3 vectors for R, G and B color components. The tables can be considered as a color-by-color pixel transformation applied to the whole image. Thus the value of one color cannot affect the value of a different color. I'm sceptical if the processing/filtering you would like to perform is possible with this constraint.

Maybe with a different API, arbitrary transformation/filtering is possible, but I don't know exactly how. Apparently compiz has (had?) a plugin that can perform arbitrary filtering of display colors:

http://askubuntu.com/questions/211617/how-can-i-recover-the-compiz-color-filter-plugin-in-ubuntu-12-10

http://askubuntu.com/questions/538896/compiz-plugins-filter-ordering

@vn971
Copy link
Author

vn971 commented Mar 20, 2015

@zoltanp Thank you very much for your answer!

Yes, [unfortunately,] RandR can't apply color transformation matrices. They really seem to have independent color "function", which makes by-value inversion impossible. (I studied your code, too, as well as xcalib-s.) Sad to know that there is no straightforward work-around known.

Ok, anyway, thanks again for your answer and view on the subject!

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

3 participants