Skip to content

App.changeTheme method

App › changeTheme

Unofficial

Change the base color scheme of the application and store it in the vault config.

Signature:

changeTheme(theme: "moonstone" | "obsidian" | "system"): void

Parameters:

ParameterTypeDescription
theme"moonstone" | "obsidian" | "system"The color scheme to set: 'moonstone' is light, 'obsidian' is dark, 'system' follows the operating system.

Returns: void

Remarks:

This is what the Appearance > Base color scheme dropdown calls. The value is stored with app.vault.setConfig('theme', theme).