Skip to content
ConsoleMonster
Interface

ITheme

ConsoleMonster.Styling

Namespace
ConsoleMonster.Styling
Assembly
ConsoleMonster
Modifiers
abstract

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.

Accepted by parameters 27

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 required
The token.
depth ConsoleMonster.Capabilities.ColorDepth required
The colour depth being rendered.

Returns

Style The style.
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 required
Token name, for example pass or muted.
depth ConsoleMonster.Capabilities.ColorDepth required
The colour depth being rendered.
style ConsoleMonster.Styling.Style required
The resolved style.

Returns

bool Whether the name is a token of this theme.

Properties

public abstract string Name { get; } #

The theme name.