Appearance
Information about user's appearance preferences.
| Module | require("gui") |
| Type | Object |
This class can not be created by user, you can only receive its global
instance from the appearance property of the module:
gui.appearance.isDarkScheme()
Methods
setDarkModeEnabled(enable) Windows
Enable Windows 10 dark mode for current app.
The dark mode of Windows 10 does not support Win32 apps officially and this API makes use of private APIs to force enabling dark mode for current app.
Note that this API can only enable dark mode for window titlebars, all the views and colors are still using light color schemes. You should only use this API when developing custom-drawn apps.
Parameters
Booleanenable
isDarkScheme()
Return whether this app is using a dark color scheme.
Note that on Windows the dark mode does not support Win32 apps, and this
method will always return false unless dark mode is explicitly enabled
with setDarkModeEnabled.
Return
BooleanEvents
onColorSchemeChange()
Emitted when user has changed system color scheme preferences.