Extension methods for Theme that give convenient, typed access to the colours and styles embedded in a theme's Style properties. More...
Static Public Member Functions | |
| static ? IColor | Accent (this Theme theme) |
| Accent colour — the border-foreground colour from Theme.BorderStyle. | |
| static Style | AccentStyle (this Theme theme) |
| Accent style suitable for headings and highlights. | |
| static Style | BaseColorStyle (this Theme theme) |
| Returns a Style combining both the theme's foreground and background colours. | |
| static ? IColor | Bg (this Theme theme) |
Background colour from Theme.BaseStyle, or null if the theme does not specify one. | |
| static Style | BgStyle (this Theme theme) |
| Returns a Style that applies the theme's background colour. | |
| static Style | Error (this Theme theme) |
| Error / danger style (red or theme equivalent). | |
| static ? IColor | Fg (this Theme theme) |
Foreground colour from Theme.BaseStyle, or null if the theme does not specify one. | |
| static ? IColor | FocusColor (this Theme theme) |
| Focus-ring colour — the border-foreground colour from Theme.FocusedStyle. | |
| static Style | GetStyle (this Theme theme, string key, Style fallback=default) |
| Retrieve an arbitrary named style slot with a fallback. | |
| static Style | MutedStyle (this Theme theme) |
| Muted / secondary-text style for hints, descriptions, and status text. | |
| static Style | SecondaryStyle (this Theme theme) |
| Secondary style — slightly less prominent than muted. | |
| static Style | Success (this Theme theme) |
| Success / positive-state style (green or theme equivalent). | |
| static Style | Warning (this Theme theme) |
| Warning / caution style (yellow/orange or theme equivalent). | |
Extension methods for Theme that give convenient, typed access to the colours and styles embedded in a theme's Style properties.
Accent colour — the border-foreground colour from Theme.BorderStyle.
This is the theme's primary brand / highlight colour used for borders and headings. Returns null if the theme does not specify one.
Accent style suitable for headings and highlights.
Returns Named["accent"] if present; otherwise constructs a style with the Accent colour as foreground. Falls back to Style.Default when the theme has no accent.
Returns a Style combining both the theme's foreground and background colours.
All widgets placed inside a container that uses this style will inherit the full base palette.
Returns a Style that applies the theme's background colour.
When the theme has no background, returns Style.Default. Useful for setting a full-terminal background on the root container.
Error / danger style (red or theme equivalent).
Returns Named["error"] if present; otherwise Style.Default.
Focus-ring colour — the border-foreground colour from Theme.FocusedStyle.
Returns null if the theme does not specify one.
|
static |
Retrieve an arbitrary named style slot with a fallback.
| theme | The theme to query. |
| key | Named style key (e.g. "muted", "accent"). |
| fallback | Style to return when the key is absent. Defaults to Style.Default. |
Muted / secondary-text style for hints, descriptions, and status text.
Returns Named["muted"] if present; otherwise falls back to Theme.DisabledStyle.
Secondary style — slightly less prominent than muted.
Returns Named["secondary"] if present; otherwise falls back to MutedStyle.
Success / positive-state style (green or theme equivalent).
Returns Named["success"] if present; otherwise Style.Default.
Warning / caution style (yellow/orange or theme equivalent).
Returns Named["warning"] if present; otherwise Style.Default.