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

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of How can I get the main color of Windows 10 in Electron apps? without wasting too much if your time.

The question is published on by Tutorial Guruji team.

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…

Answer

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.

We are here to answer your question about How can I get the main color of Windows 10 in Electron apps? - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji