Class Palette
- Namespace
- SharpConsoleUI.Themes
- Assembly
- SharpConsoleUI.dll
A small set of seed colors used to generate a complete theme via FromPalette(Palette). Every field is optional: unset fields are derived (secondary/tertiary from primary, foreground from background contrast, status colors from mode-tuned defaults, background from the mode).
public sealed record Palette : IEquatable<Palette>
- Inheritance
-
Palette
- Implements
- Inherited Members
- Extension Methods
Properties
Background
Window/desktop background. Drives the neutral family. Defaults per Mode.
public Color? Background { get; init; }
Property Value
Danger
Danger/error color. Defaults to a mode-tuned red.
public Color? Danger { get; init; }
Property Value
Foreground
Default text color. Defaults to a readable contrast on Background.
public Color? Foreground { get; init; }
Property Value
Info
Info color. Defaults to a mode-tuned cyan/blue.
public Color? Info { get; init; }
Property Value
Mode
Explicit light/dark mode. When null, the generator infers it from Background luminance, falling back to Dark if no background is given.
public ThemeMode? Mode { get; init; }
Property Value
Primary
The main accent color (borders, buttons, selection). Drives the accent family.
public Color? Primary { get; init; }
Property Value
Secondary
Secondary accent. Defaults to a shaded Primary when unset.
public Color? Secondary { get; init; }
Property Value
Success
Success color. Defaults to a mode-tuned green.
public Color? Success { get; init; }
Property Value
Tertiary
Tertiary accent. Defaults to a shaded Secondary when unset.
public Color? Tertiary { get; init; }
Property Value
Warning
Warning color. Defaults to a mode-tuned amber.
public Color? Warning { get; init; }