TerminalColorTheme class final
Complete terminal color theme pairing default fg/bg, cursor, selection, and the 16-color ANSI palette.
Constructors
-
TerminalColorTheme({required String id, required String name, required TerminalBrightness brightness, required Color foreground, required Color background, required Color cursorColor, required Color cursorTextColor, required Color selectionBackground, Color? selectionForeground, required List<
Color> ansi}) -
Creates an immutable terminal color theme.
const
Properties
-
ansi
→ List<
Color> -
16 ANSI colors (
0..7normal,8..15bright).final - background → Color
-
Default canvas background color when cell
bg == 0.final - brightness → TerminalBrightness
-
Polarity of this theme (
darkorlight).final - cursorColor → Color
-
Cursor fill color.
final
- cursorTextColor → Color
-
Text color rendered inside a solid block cursor.
final
- foreground → Color
-
Default text foreground color when cell
fg == 0.final - hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Stable preset identifier (for example
'termui_dark').final - name → String
-
Human-readable display name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionBackground → Color
-
Selection highlight background color.
final
- selectionForeground → Color?
-
Optional explicit selection foreground color (
nullpreserves cell fg).final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveAnsi256(
int index) → Color -
Resolves an ANSI 256-color index (
0..255) using this theme's 16-color palette for slots0..15and standard xterm-256 cube/grayscale math above. -
resolvePackedColor(
int packedColor) → int -
Resolves a packed ARGB or
Color.ansiinteger against this theme. -
toString(
) → String -
A string representation of this object.
inherited
-
withOverrides(
CustomPaletteOverrides overrides) → TerminalColorTheme -
Returns a derived theme with
overridesapplied.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
byId(
String id) → TerminalColorTheme? -
Looks up a built-in preset by
id, or returnsnullwhen unknown.
Constants
- catppuccinMocha → const TerminalColorTheme
- Catppuccin Mocha dark palette.
- gruvboxDark → const TerminalColorTheme
- Gruvbox Dark palette.
- highContrastDark → const TerminalColorTheme
- High-contrast dark theme targeting WCAG AAA (>= 7:1) across ANSI slots.
- highContrastLight → const TerminalColorTheme
- High-contrast light theme targeting WCAG AAA (>= 7:1) across ANSI slots.
- legacyVga → const TerminalColorTheme
-
Classic VGA 16-color palette on
#000000/#FFFFFF. -
presets
→ const List<
TerminalColorTheme> - All 8 built-in presets ordered for UI selection.
- solarizedDark → const TerminalColorTheme
- Canonical Solarized Dark palette.
- solarizedLight → const TerminalColorTheme
- Canonical Solarized Light palette.
- termuiDark → const TerminalColorTheme
-
Default dark theme with accessible ANSI 4 folder blue (
#5294E2). - termuiLight → const TerminalColorTheme
- Clean light theme with dark-ink ANSI hues for daytime readability.