Skip to content
ConsoleMonster
Struct

ThemeStyle

ConsoleMonster.Styling

Namespace
ConsoleMonster.Styling
Assembly
ConsoleMonster
Base
ValueType
Modifiers
sealed

The definition of one theme token: optional foreground and background theme colours plus decorations.

Inheritance

  • ValueType
  • ThemeStyle

Usage

Explore 3 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 1

Accepted by parameters 2

Constructors

public ThemeStyle(ThemeColor? color, ThemeColor? backgroundColor = null, TextDecoration decoration = None) #

Creates a theme style.

Parameters

color ConsoleMonster.Styling.ThemeColor? required
Foreground, or null for the terminal default.
backgroundColor ConsoleMonster.Styling.ThemeColor? = null optional
Background, or null for the terminal default.
decoration ConsoleMonster.Styling.TextDecoration = None optional
Decorations.

Methods

public Style Resolve(ColorDepth depth) #

Resolves to a concrete style for a colour depth.

Parameters

depth ConsoleMonster.Capabilities.ColorDepth required
The depth.

Returns

Style The style.

Properties

public ThemeColor? Color { get; } #

Foreground, or null for the terminal default.

public ThemeColor? BackgroundColor { get; } #

Background, or null for the terminal default.

public TextDecoration Decoration { get; } #

Decorations.