在 Windows 10 中获取夜灯模式的状态

Get status of night light mode in Windows 10(在 Windows 10 中获取夜灯模式的状态)
本文介绍了在 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 中获取夜灯模式的状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)