I have an Electron app that uses CSS prefers-color-scheme
to implement dark mode. This works fine on Windows and Mac, but not on Linux (presumably because Chromium doesn't have a way of querying the desktop theme).
I would like to provide an option to override the value that Chromium automatically finds for prefers-color-scheme
. Is there a way to do this using the Electron API?