Interface
ITheme
ConsoleMonster.Styling
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 43 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 16
- Property RenderContext.Theme
- Property ExportOptions.DarkTheme
- Property ExportOptions.LightTheme
- Property RecordingExportOptions.CustomTheme
- Property HeadlessTerminal.Theme
- Property InteractiveOptions.Theme
- Property LiveSessionOptions.Theme
- Property LogTailOptions.Theme
- Property ConsoleTarget.Theme
- Property ITerminalTarget.Theme
- Property NullTarget.Theme
- Property RecordingTarget.Theme
- Property WriterTarget.Theme
- Property PromptContext.Theme
- Method Terminal.ResolveTheme
- Property Terminal.Theme
Accepted by parameters 27
- Constructor RenderContext.RenderContext
- Method ConsoleExporter.Render
- Extension method ExportOptions.DarkTheme
- Extension method ExportOptions.LightTheme
- Method ExportOptionsFluent.DarkTheme
- Method ExportOptionsFluent.LightTheme
- Extension method RecordingExportOptions.CustomTheme
- Method RecordingExportOptionsFluent.CustomTheme
- Extension method InteractiveOptions.Theme
- Method InteractiveOptionsFluent.Theme
- Extension method LiveSessionOptions.Theme
- Method LiveSessionOptionsFluent.Theme
- Extension method LogTailOptions.Theme
- Method LogTailOptionsFluent.Theme
- Constructor PromptContext.PromptContext
- Method RichColor.TryGetRgb
- Method ThemeCheck.Run
- Method ThemeFile.FromTheme
- 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) #Resolves 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.
public abstract bool TryResolve(string name, ColorDepth depth, out Style style) #Resolves a token by name (case-insensitive), as used in markup such as [pass].
Parameters
- name 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
bool Whether the name is a token of this theme.Properties
public abstract string Name { get; } #The theme name.