Linho
Linho

Reputation: 33

How can I get the main color of Windows 10 in Electron apps?

I've used an app built by Electron called Knote, and there was a feature that allows you to set the main color of the application to the main color of Windows 10 (but it seems that the feature was gone now). So I wondered that, is there any APIs or functions that allows Electron apps to get the main color of Windows 10?

p.s. I'm a student from China and I don't know whether my English is good or not... So please, do not care about any grammatical mistakes...

Upvotes: 1

Views: 772

Answers (1)

255kb - Mockoon
255kb - Mockoon

Reputation: 6974

Electron's systemPreferences API has a bunch of methods like getAccentColor(), getColor(), etc. Some are compatible with Windows, macOS or both. I just tested some on Windows 10 and they seem to be working well. I suggest that you take a look at these.

Upvotes: 1

Related Questions