Skip to content
ConsoleMonster
Cmdlet

Set-ConsoleTheme

Module
ConsoleMonster

Selects the theme used by every ConsoleMonster widget.

Syntax

Set-ConsoleTheme
[-Accessible]
[-Save]
[-Theme] <String>
[<CommonParameters>]
#
Parameter set: Name
Set-ConsoleTheme
[-Accessible]
-Path <String>
[-Save]
[<CommonParameters>]
#
Parameter set: Path

Description

Select a built-in preset or catalogue scheme, follow your terminal with Terminal, or load a validated JSON/PSD1 theme. Catalogue schemes use upstream colours faithfully by default; -Accessible chooses colours that pass ThemeCheck. The saved accessible name is Dracula · accessible, for example. Dark suits dark terminals, Light suits light backgrounds and HighContrast uses saturated primaries. ColorBlindSafe keeps pass, warning and fail distinct with red-green colour blindness (blue, yellow and underlined rose) and picks its light variant when it detects a light background; where the background cannot be detected (for example in Windows Terminal) it uses the dark variant, so choose ColorBlindSafeLight there. ColorBlindSafeLight and ColorBlindSafeDark choose one explicitly. To keep a theme in every session, add -Save: it is written to the settings file, which every session and every tool built on ConsoleMonster reads (Set-ConsoleSetting Theme does the same, and Show-ConsoleSetting previews themes before choosing). CONSOLEMONSTER_THEME, for example colorblind, still overrides the file. Files use the built-in token names. PSD1 files are imported as restricted data and never executed. Invalid files leave the current theme unchanged.

Examples

Example 1

Set-ConsoleTheme -Theme Light

Use the light theme for this session

Example 2

Set-ConsoleTheme -Theme ColorBlindSafe

Use status colours that stay distinct with red-green colour blindness

Example 3

$themeOptions = @{
    Save = $true
    Theme = 'ColorBlindSafe'
}
Set-ConsoleTheme @themeOptions

Keep the colour-blind-safe theme in every new session

Example 4

$themeOptions = @{
    Accessible = $true
    Save = $true
    Theme = 'Dracula'
}
Set-ConsoleTheme @themeOptions

Keep the accessible Dracula scheme in every session

Example 5

# Requires an existing team-theme.psd1 file. Changes the active session theme.
Set-ConsoleTheme -Path ./team-theme.psd1

Load an existing theme exported by Export-ConsoleTheme

Parameters

-Accessible SwitchParameter optional
Uses a catalogue scheme's accessible variant, or re-derives a version 3 BaseScheme file while preserving its explicit token overrides. Built-in presets do not have scheme variants.
-Save SwitchParameter optional
Also writes the theme to the settings file, so every new session uses it.
-Theme String requiredposition: 0sets: Name
A built-in preset, Terminal, or a catalogue scheme or family. Theme.Schemes lists the ten palettes. Solarized, Gruvbox, Catppuccin and Tokyo Night select light or dark for the detected background (dark when unknown). Explicit names such as Solarized Light, Catppuccin Latte and Tokyo Night Dark choose one variant. Add · accessible to a catalogue name, or use -Accessible.
-Path String requiredsets: Path
A literal .json or .psd1 theme file path. Relative paths use the current PowerShell location. All values are validated before applying the theme.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.