-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShouldAppsUseDarkMode is incorrect on Win10 1903+ #3
Comments
|
Instead of #include <iostream>
#include <winrt/Windows.UI.ViewManagement.h>
auto uisettings = winrt::Windows::UI::ViewManagement::UISettings();
auto color = uisettings.GetColorValue(winrt::Windows::UI::ViewManagement::UIColorType::Foreground);
bool isbright = (0.299 * color.R + 0.587 * color.G + 0.114 * color.B) < 127.5;
std::cout << "isbright: " << isbright << std::endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
returned inncorrect result on Win10 1903+, you should call:
ps: also for x64 builds right way for set properties of BOOL (INT) is:
The text was updated successfully, but these errors were encountered: