Import-ConsoleTheme
Imports a terminal colour scheme as a version 3 ConsoleMonster theme.
Syntax
Import-ConsoleTheme
[-Accessible]
[-OutFile <String>]
[-Path] <String>
[<CommonParameters>]#All Parameter SetsDescription
Reads a single Windows Terminal scheme object (or a settings.json with one schemes entry), an XML iTerm2 .itermcolors file, or a flat base16 YAML scheme. The generated JSON embeds the scheme so its roles are derived when loaded. Accessible first chooses status colours from the palette, then adjusts OKLCH lightness where needed. The command writes the file and returns Test-ConsoleTheme's report and verdict lines, including adjusted tokens; failing checks never prevent import. It does not change the active theme or settings.
Examples
Example 1
# Requires an existing Windows Terminal scheme JSON file.
Import-ConsoleTheme -Path ./my-scheme.json -OutFile ./my-theme.jsonImport a Windows Terminal scheme and inspect its verdict.
Example 2
# Requires an existing sRGB iTerm2 .itermcolors file.
Import-ConsoleTheme -Path ./my-scheme.itermcolors -Accessible -OutFile ./my-theme.json
Set-ConsoleTheme -Path ./my-theme.jsonImport an accessible variant, then use it.
Parameters
- -Accessible SwitchParameter
- Chooses the accessible variant and records tokens adjusted for contrast or colour-vision separation.
- -OutFile String
- The destination JSON theme file. Defaults to the source directory and base name with .theme.json. The source file cannot be overwritten.
- -Path String
- A literal .json, .itermcolors, .yaml or .yml scheme file. Relative paths use the current PowerShell location.
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.