API Reference
Interface
ITheme
Maps semantic tokens to styles per colour tier. Implement it for brand themes, or start from Theme.Dark and override tokens with Theme.With.
Usage
Explore 25 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 13
- Property RenderContext.Theme
- Property ExportOptions.DarkTheme
- Property ExportOptions.LightTheme
- Property RecordingExportOptions.CustomTheme
- Property InteractiveOptions.Theme
- Property LiveSessionOptions.Theme
- Property ConsoleTarget.Theme
- Property ITerminalTarget.Theme
- Property NullTarget.Theme
- Property RecordingTarget.Theme
- Property WriterTarget.Theme
- Method Terminal.ResolveTheme
- Property Terminal.Theme
Accepted by parameters 12
- Constructor RenderContext.RenderContext
- Method ConsoleExporter.Render
- Method RichColor.TryGetRgb
- Method Terminal.CreateContext
- Method Terminal.Render
- Method Terminal.RenderEncoded
- Method Terminal.RenderText
- Method TestTerminal.Render
- Method Markup.Parse
- Method Markup.TryParseStyle
- Method Markup.Validate
- Method RichText.Gradient
Methods
public abstract Style Resolve(ThemeToken token, ColorDepth depth) #Returns:
StyleResolves a token to a concrete style for a colour depth.
Parameters
- token ConsoleMonster.Styling.ThemeToken
- The token.
- depth ConsoleMonster.Capabilities.ColorDepth
- The colour depth being rendered.
Returns
The style.
public abstract Boolean TryResolve(String name, ColorDepth depth, out Style style) #Returns:
BooleanResolves a token by name (case-insensitive), as used in markup such as [pass].
Parameters
- name System.String
- Token name, for example pass or muted.
- depth ConsoleMonster.Capabilities.ColorDepth
- The colour depth being rendered.
- style ConsoleMonster.Styling.Style
- The resolved style.
Returns
Whether the name is a token of this theme.
Properties
public abstract String Name { get; } #The theme name.