Invert colors of the active window

9,278

Solution 1

If you are looking for a method universal for any window, then this must be made available by the window manager. Therefore I'm afraid any non-composite WM will not be able to do that on demand. So maybe you previously did this with Compiz?

A method of inverting colors regardless of WM is doing this per-application - as with xpdf that you mentioned. There are some applications that have such functionality, but usually you won't be able to invert the colors at run-time. For apps like xpdf, you can either have an alternative desktop menu entry (or icon) that runs the app with special parameters, or define those in your .Xdefaults. For xpdf note also the use of paperColor, foreground and background resources.

Solution 2

I found a tool called compton in an answer to a similar question. https://askubuntu.com/questions/134668/how-to-trigger-a-color-inversion-effect-for-one-window

Share:
9,278

Related videos on Youtube

invert
Author by

invert

bitwise operators flail while true loops recurse stack overflow, bits and bytes

Updated on September 18, 2022

Comments

  • invert
    invert over 1 year

    Sometimes I work in low light and I need to invert the color of specific windows to reduce my eye strain. This could be my pdf viewer to web pages for reference work.

    I know how to invert the entire screen:

    xcalib -invert -alter
    

    But I can't find any man pages, docs or posts how to invert a single window only. I did this before yet cannot find how. Bizarre!

    Searching the repos for other xorg tools I found xpdf, it has invert support but won't help for anything other than viewing pdf's. I don't use compositing so please don't suggest Compiz. I use Openbox WM. Thanks all.

    Update

    Instead of a general all-purpose tool to invert any window, I focused my search on how to invert colors for a Google Chrome tab instead. I found Color Bookmarklets, you drag them to the browser toolbar and hit them to change the page content to invert the colors (invert lightness).

    • Grzegorz Wierzowiecki
      Grzegorz Wierzowiecki over 6 years
      I find KWin+Compiz (e.g. with KDE) to do job of inverting colors of selected (active) windows perfectly.
  • invert
    invert over 12 years
    I did have Compiz on one of the desktops at the time IIRC, perhaps I did just confuse the Compiz invert window function with that of another tool. +1 for the mention of .XDefaults resources