Windows 中是否有任何机制允许系统范围内的颜色反转(即夜间模式)?
我最喜欢的 Mac OSX 应用程序之一是 Blacktree 的 Nocturne,它会反转整个屏幕的颜色,这样您最终会在整个系统范围内看到黑白显示,在黑暗的房间里很容易看清。 示例。
我查看了一下,似乎目前没有办法在 Windows 上执行此操作。你能得到的最接近的是黑暗主题,大多数应用程序都会忽略它(并且无论如何也不能解决问题 - 请参阅下面我对 Paul 的答案的评论),或者像 F.lux 或 Friendeye 这样的应用程序只是降低亮度和/或改变颜色设置,但我发现没有什么可以真正反转整个屏幕的颜色。
所以我的问题是,是否有可能编写一个在 Windows 中执行此操作的应用程序? DWM、NVIDIA 驱动程序或图形子系统的任何其他部分是否有 API 允许您在如此基本的级别上操作渲染图像?一个人甚至会在哪里?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
问题已经存在一年多了,但更合适的答案可能是 http://arcanesanctum.net/negativescreen/。
也适用于 Windows 8,源代码是 C# 语言。它可能会立即解决您的问题,或者您可以阅读源代码来扩展功能。
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.
我能想到的一种方法是:
DLL 注入是一种非常常见的技术。至于挂钩,Microsoft Detours 应该可以正常工作。
此外,您可能会扰乱防病毒软件,因此将其作为市售产品分发可能不是最好的主意。
One way I can think of:
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.
这已经是 Windows 中的设置,将主题设置为高对比度:
This is already a setting in Windows, set the theme to High Contrast:
你可以得到与Windows7内置的放大镜类似的东西:启动它,单击“-”按钮,使其缩放到100%(因此没有实际放大!),然后在选项对话框中,选中“打开颜色”反转”复选框。
有关此内容的更多详细信息,请访问 WikiHow。
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.
Windows 有名为 Magnification 的 WInAPi C++ lib,因此您可以使用它应用颜色转换(又名颜色反转、灰度、色盲滤镜)。
NegativeScreen 包含 C# 的包装器:
http://arcanesanctum.net/negativescreen/
Python 包装器:
https://pypi.org/project/WinMagnification/
Windows has WInAPi C++ lib which names Magnification, so you can apply color tranformations (aka color inversion, grayscale, color blind filters) with it.
NegativeScreen contains wrapper for C#:
http://arcanesanctum.net/negativescreen/
Python wrapper here:
https://pypi.org/project/WinMagnification/