Is there any mechanism in Windows that would allow for system-wide color-inversion (i.e. night mode)?

StackOverflow https://stackoverflow.com/questions/8717925

  •  13-04-2021
  •  | 
  •  

Question

One of my favorite Mac OSX apps is Blacktree's Nocturne, which inverts the colors of the whole screen such that you end up with a black-on-white display systemwide that is easy on the eyes in a dark room. Example.

I went looking and it seems that there is currently no way of doing this for Windows. The closest you can get are either dark themes, which most apps will ignore (and don't solve the problem anyways - see my comment to Paul's answer below), or apps like F.lux or Friendeye that simply lower the brightness and/or alter color settings, but I found nothing that would actually invert the colors for the whole screen.

So my question is, is it even possible to write an application that would do this in Windows? Do DWM, NVIDIA drivers, or any other part of the graphics subsystem have any API that allow you to manipulate the rendered image at such a basic level? Where would one even being?

Was it helpful?

Solution

Question is more than a year old, but a more appropriate answer may be http://arcanesanctum.net/negativescreen/.

Works in windows 8 too, source code is in C#. It may solve straight away your problem, or you may read the source to expand functionality.

OTHER TIPS

This is already a setting in Windows, set the theme to High Contrast:

enter image description here

One way I can think of:

  • inject a DLL that hooks CreateProcess to inject itself into future processes
  • hook EndPaint to call GetDIBits, invert everything, and SetDIBits

DLL injection is a pretty common technique. As for hooking, Microsoft Detours should work jut fine.

Also, you might upset the antiviruses, so distributing this as a marketed product probably wouldn't be the best of ideas.

You can get something similar with the Magnifier built into Windows7: start it up, click the "-" button so that it's zooming at 100% (therefore no actual magnification!), and then in the Options dialog, check the "Turn on color inversion" checkbox.

Some more details about this at WikiHow.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top