在 Windows 10 中获取夜灯模式的状态 [英] Get status of night light mode in Windows 10

查看:19
本文介绍了在 Windows 10 中获取夜灯模式的状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用

<小时>

背景:我正在研究环境光实现,如果启用了夜灯模式,颜色偏移不会反映在我屏幕周围的 LED 中,因此屏幕内容和屏幕周围"之间的颜色会关闭.

解决方案

可以查看

的输出

GetDeviceGammaRamp

来自 Win API 的函数.将输出与夜灯 ON 和 OFF 进行比较,您应该可以检测到它.

或者您可以尝试监视此 Reg 键的更改

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionCloudStoreStoreCacheDefaultAccount$$windows.data.bluelightreduction.settingsCurrent

I am using the desktop duplication api to grab the screen content and as it turns out, the new night light mode ('Nachtmodus' in German) is not applied in the grabbed screen content.

How do I read (if possible directly in c#) the night mode status (enabled, color shift amount)?

or

How can I tell Windows to give me the color shifted image using the desktop duplication api?

Basically, I want to know the state of what is configured inside these red boxes:


Background: I am working on an ambilight implementation and if the night light mode is enabled, the color shift is not reflected in the LEDs around my screen and so the colors are off between screen content and 'around screen'.

解决方案

You can check the output of

GetDeviceGammaRamp

Function from the Win API. Compare the output to Night Light ON and OFF and you should detect it.

Or you can try to monitor this Reg key for changes

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionCloudStoreStoreCacheDefaultAccount$$windows.data.bluelightreduction.settingsCurrent

这篇关于在 Windows 10 中获取夜灯模式的状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆