Class
TerminalScheme
ConsoleMonster.Styling
An immutable terminal scheme: sixteen ANSI colours and its default foreground and background.
Inheritance
- object
- TerminalScheme
Usage
Explore 8 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 7
- Method TerminalScheme.Load
- Method TerminalScheme.ParseBase16
- Method TerminalScheme.ParseITermColors
- Method TerminalScheme.ParseWindowsTerminal
- Property Theme.Scheme
- Property ThemeScheme.Scheme
- Property Terminal.Palette
Accepted by parameters 1
- Method Theme.FromScheme
Constructors
public TerminalScheme(string name, IReadOnlyList<Color> palette, Color foreground, Color background, Color? selection = null, Color? cursor = null, Color? signatureAccent = null) #Creates a scheme from RGB colours in ANSI index order (black through bright white).
Parameters
- name string
- palette System.Collections.Generic.IReadOnlyList<ConsoleMonster.Styling.Color>
- foreground ConsoleMonster.Styling.Color
- background ConsoleMonster.Styling.Color
- selection ConsoleMonster.Styling.Color? = null
- cursor ConsoleMonster.Styling.Color? = null
- signatureAccent ConsoleMonster.Styling.Color? = null
Methods
public static TerminalScheme Load(string path) #Reads a scheme using its .json, .itermcolors, .yaml or .yml extension.
Parameters
- path string
Returns
TerminalSchemepublic static TerminalScheme ParseBase16(string yaml) #Reads a base16 scheme in flat key: value YAML form, without tags, aliases or nested YAML.
Parameters
- yaml string
Returns
TerminalSchemepublic static TerminalScheme ParseITermColors(string plist, string name = "Imported iTerm2") #Reads an XML iTerm2 .itermcolors property list. External entities and DTD resolution are disabled.
Parameters
- plist string
- The XML property list.
- name string = "Imported iTerm2"
- The scheme name, usually the file name.
Returns
TerminalSchemepublic static TerminalScheme ParseWindowsTerminal(string json) #Reads a Windows Terminal scheme object, or a settings document containing exactly one schemes entry.
Parameters
- json string
Returns
TerminalScheme