Windows
Overview
The Themes API is accessible via the io.themes object.
ℹ️ See the JavaScript Themes example on GitHub.
Listing All Themes
To get a list of all available themes, use the list() method:
const allThemes = await io.themes.list();Current Theme
To get the currently selected theme, use the getCurrent() method:
const currentTheme = await io.themes.getCurrent();Selecting Themes
To select a theme, use the select() method:
const themeName = "dark";
await io.themes.select(themeName);Events
To get notified when the theme changes, use the onChanged() method:
const handler = newTheme => console.log(newTheme.name);
io.themes.onChanged(handler);API Reference
For a complete list of the available Themes API methods and properties, see the Themes API Reference Documentation.