Take the tour ×  In Ubuntu, for example, you can use Super-M to
invert the screen colors (requires desktop effects, see [1]).
Other OSes have similar abilities, although I'm not really
concerned with anything other than Linux.  Which API should I
look into if I want to write a simple program that, when run,
inverts the screen colors?  The language that I use the API from
doesn't particularly matter to me. I am familiar enough with
C/C++/Bash/Perl/Python that I can hack this up in whatever
language has the easiest access to this API. Working on Ubuntu
is required, working on other similar *nixes is not terribly
important.  [1] https://help.ubuntu.com/community/KeyboardShortc
uts#Desktop%20Effects%20enabled%20shortcuts  share|improve this
question add comment  1 Answer  up vote 7 down vote accepted
You could use xcalib to do what you want.  For example, a simple
bash script to invert the screen colors would look like this:
xcalib -invert -alter share|improve this answer add comment
Your Answer