Invert colors of the active window












23















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).










share|improve this question

























  • I find KWin+Compiz (e.g. with KDE) to do job of inverting colors of selected (active) windows perfectly.

    – Grzegorz Wierzowiecki
    Sep 18 '17 at 18:29
















23















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).










share|improve this question

























  • I find KWin+Compiz (e.g. with KDE) to do job of inverting colors of selected (active) windows perfectly.

    – Grzegorz Wierzowiecki
    Sep 18 '17 at 18:29














23












23








23


3






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).










share|improve this question
















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).







xorg colors window-manager






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 14 '11 at 8:58







invert

















asked Sep 12 '11 at 18:43









invertinvert

1,11311423




1,11311423













  • I find KWin+Compiz (e.g. with KDE) to do job of inverting colors of selected (active) windows perfectly.

    – Grzegorz Wierzowiecki
    Sep 18 '17 at 18:29



















  • I find KWin+Compiz (e.g. with KDE) to do job of inverting colors of selected (active) windows perfectly.

    – Grzegorz Wierzowiecki
    Sep 18 '17 at 18:29

















I find KWin+Compiz (e.g. with KDE) to do job of inverting colors of selected (active) windows perfectly.

– Grzegorz Wierzowiecki
Sep 18 '17 at 18:29





I find KWin+Compiz (e.g. with KDE) to do job of inverting colors of selected (active) windows perfectly.

– Grzegorz Wierzowiecki
Sep 18 '17 at 18:29










3 Answers
3






active

oldest

votes


















6














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.






share|improve this answer
























  • 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

    – invert
    Sep 14 '11 at 8:53



















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|improve this answer

































    0














    KWin with Compiz are doing this!
    (Still I have since some time to reenable "Composing" after each reboot with "Alt+Shift+F12" - at least that's shortcut I have under System Settings → Shortcuts → Global Shortcuts → Kwin)



    Actually I really need inverting color of specific windows (not whole screen) and that's main reason why I often choose KDE -> it has build in support for this!



    You go in System Settings → Desktop Behaviour → Desktop Effects → Invert and you click on settings for Invert effect and select convenient shortcut (I selected long one, as I mapped it on my Kinesis Keyboard under Capslock as I invert colours very often for my eyes...).



    Settings of Invert Desktop Effect under: System Settings → Desktop Behaviour → Desktop Effects → Invert



    P.S. It seems there some people managed to marry KWin e.g. with Xmonad or Xmonad with Compiz so maybe don't have to fully switch to KDE. (Actually I have to try xmonad+kwin one day...) anyway, there are also kwin scripts to change it's behaviour like https://github.com/faho/kwin-tiling . Enjoy!






    share|improve this answer

























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f20565%2finvert-colors-of-the-active-window%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      6














      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.






      share|improve this answer
























      • 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

        – invert
        Sep 14 '11 at 8:53
















      6














      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.






      share|improve this answer
























      • 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

        – invert
        Sep 14 '11 at 8:53














      6












      6








      6







      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.






      share|improve this answer













      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.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Sep 13 '11 at 13:43









      rozcietrzewiaczrozcietrzewiacz

      29.4k47392




      29.4k47392













      • 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

        – invert
        Sep 14 '11 at 8:53



















      • 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

        – invert
        Sep 14 '11 at 8:53

















      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

      – invert
      Sep 14 '11 at 8:53





      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

      – invert
      Sep 14 '11 at 8:53













      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|improve this answer






























        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|improve this answer




























          2












          2








          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|improve this answer















          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|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 '17 at 12:22









          Community

          1




          1










          answered Aug 12 '16 at 18:00









          manymany

          211




          211























              0














              KWin with Compiz are doing this!
              (Still I have since some time to reenable "Composing" after each reboot with "Alt+Shift+F12" - at least that's shortcut I have under System Settings → Shortcuts → Global Shortcuts → Kwin)



              Actually I really need inverting color of specific windows (not whole screen) and that's main reason why I often choose KDE -> it has build in support for this!



              You go in System Settings → Desktop Behaviour → Desktop Effects → Invert and you click on settings for Invert effect and select convenient shortcut (I selected long one, as I mapped it on my Kinesis Keyboard under Capslock as I invert colours very often for my eyes...).



              Settings of Invert Desktop Effect under: System Settings → Desktop Behaviour → Desktop Effects → Invert



              P.S. It seems there some people managed to marry KWin e.g. with Xmonad or Xmonad with Compiz so maybe don't have to fully switch to KDE. (Actually I have to try xmonad+kwin one day...) anyway, there are also kwin scripts to change it's behaviour like https://github.com/faho/kwin-tiling . Enjoy!






              share|improve this answer






























                0














                KWin with Compiz are doing this!
                (Still I have since some time to reenable "Composing" after each reboot with "Alt+Shift+F12" - at least that's shortcut I have under System Settings → Shortcuts → Global Shortcuts → Kwin)



                Actually I really need inverting color of specific windows (not whole screen) and that's main reason why I often choose KDE -> it has build in support for this!



                You go in System Settings → Desktop Behaviour → Desktop Effects → Invert and you click on settings for Invert effect and select convenient shortcut (I selected long one, as I mapped it on my Kinesis Keyboard under Capslock as I invert colours very often for my eyes...).



                Settings of Invert Desktop Effect under: System Settings → Desktop Behaviour → Desktop Effects → Invert



                P.S. It seems there some people managed to marry KWin e.g. with Xmonad or Xmonad with Compiz so maybe don't have to fully switch to KDE. (Actually I have to try xmonad+kwin one day...) anyway, there are also kwin scripts to change it's behaviour like https://github.com/faho/kwin-tiling . Enjoy!






                share|improve this answer




























                  0












                  0








                  0







                  KWin with Compiz are doing this!
                  (Still I have since some time to reenable "Composing" after each reboot with "Alt+Shift+F12" - at least that's shortcut I have under System Settings → Shortcuts → Global Shortcuts → Kwin)



                  Actually I really need inverting color of specific windows (not whole screen) and that's main reason why I often choose KDE -> it has build in support for this!



                  You go in System Settings → Desktop Behaviour → Desktop Effects → Invert and you click on settings for Invert effect and select convenient shortcut (I selected long one, as I mapped it on my Kinesis Keyboard under Capslock as I invert colours very often for my eyes...).



                  Settings of Invert Desktop Effect under: System Settings → Desktop Behaviour → Desktop Effects → Invert



                  P.S. It seems there some people managed to marry KWin e.g. with Xmonad or Xmonad with Compiz so maybe don't have to fully switch to KDE. (Actually I have to try xmonad+kwin one day...) anyway, there are also kwin scripts to change it's behaviour like https://github.com/faho/kwin-tiling . Enjoy!






                  share|improve this answer















                  KWin with Compiz are doing this!
                  (Still I have since some time to reenable "Composing" after each reboot with "Alt+Shift+F12" - at least that's shortcut I have under System Settings → Shortcuts → Global Shortcuts → Kwin)



                  Actually I really need inverting color of specific windows (not whole screen) and that's main reason why I often choose KDE -> it has build in support for this!



                  You go in System Settings → Desktop Behaviour → Desktop Effects → Invert and you click on settings for Invert effect and select convenient shortcut (I selected long one, as I mapped it on my Kinesis Keyboard under Capslock as I invert colours very often for my eyes...).



                  Settings of Invert Desktop Effect under: System Settings → Desktop Behaviour → Desktop Effects → Invert



                  P.S. It seems there some people managed to marry KWin e.g. with Xmonad or Xmonad with Compiz so maybe don't have to fully switch to KDE. (Actually I have to try xmonad+kwin one day...) anyway, there are also kwin scripts to change it's behaviour like https://github.com/faho/kwin-tiling . Enjoy!







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 1 hour ago

























                  answered 1 hour ago









                  Grzegorz WierzowieckiGrzegorz Wierzowiecki

                  5,3471464106




                  5,3471464106






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f20565%2finvert-colors-of-the-active-window%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      CARDNET

                      Boot-repair Failure: Unable to locate package grub-common:i386

                      濃尾地震