Skip to content
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

Use systemPreferences.getAccentColor() #1

Open
dotequals opened this issue Feb 4, 2019 · 6 comments
Open

Use systemPreferences.getAccentColor() #1

dotequals opened this issue Feb 4, 2019 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers Windows This issue is only for Windows

Comments

@dotequals
Copy link
Owner

To continue our goal of more naturally conforming to a user's OS level preferences, we can read systemPreferences.getAccentColor() to set the accent color if it hasn't been deviated by the user (similarly to the dark mode stuff).

Like on macOS for dark mode, we would also want to listen for accent-color-changed.

Currently I believe this is roadblocked by this issue as the color seems to be slightly wrong even when automatic isn't enabled.

It's also unclear how compatible this is with older versions of Windows as I believe the accent color used to be very transparent on versions such as 7. Although systeminformation could probably be used to lock the feature to 10/8.

@dotequals dotequals added enhancement New feature or request good first issue Good for newcomers Windows This issue is only for Windows labels Feb 4, 2019
@Ahriana
Copy link

Ahriana commented Feb 11, 2019

if you wanted to add this feature manaually you can get the color values from registry directly (check os first ofcorse) from this point HKCU\\Software\\Microsoft\\Windows\\DWM then you can use values AccentColor or ColorizationColor for the colors as i noted in the issue tracker. you can throw the values throw this to get a standard hex value the browser can understand

(integer).toString(16)

@dotequals
Copy link
Owner Author

I did see your workaround. Are you doing any other manipulation on the hex value? I haven't tried it in code yet, but the Registry Editor value looks like it's stored as ABGR.

Also interestingly enough, I tried to set the accent color in Windows 10 to #112233 via Settings and although that set the registry value correctly, if you choose custom color again in Settings it's showing me #1F3F5F

@Ahriana
Copy link

Ahriana commented Feb 13, 2019

@dotequals im not doing anything other than throwing the deciman value though toString(16), would you like me to upload the test project i showed in the video? also if you wanted i can invite you to my discord to try work somthing out?

@Ahriana
Copy link

Ahriana commented Feb 13, 2019

here you go, this is the project with the workaround repo

my discord is also RCDs#9676

@dotequals
Copy link
Owner Author

Oh thanks for that! I'll let you know if I run into any hurdles implementing it. I broke some core functionality which has taken priority.

@Ahriana
Copy link

Ahriana commented Feb 13, 2019

haha, thats the way it is, no worries if you need a hand i can see what i can do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Windows This issue is only for Windows
Projects
None yet
Development

No branches or pull requests

2 participants