CustomPaletteOverrides class final

User-defined hex color overrides applied on top of a TerminalColorTheme.

Constructors

CustomPaletteOverrides({Color? foreground, Color? background, Color? cursorColor, Color? cursorTextColor, Color? selectionBackground, Color? selectionForeground, Map<int, Color> ansiOverrides = const {}})
Creates an immutable set of palette overrides.
const

Properties

ansiOverrides → Map<int, Color>
Optional overrides for ANSI palette slots 0..15.
final
background → Color?
Optional override for the default background color.
final
cursorColor → Color?
Optional override for the cursor fill color.
final
cursorTextColor → Color?
Optional override for the text color drawn inside a block cursor.
final
foreground → Color?
Optional override for the default foreground color.
final
hashCode → int
The hash code for this object.
no setteroverride
isEmpty → bool
Whether no semantic or ANSI slot overrides are set.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectionBackground → Color?
Optional override for selection highlight background.
final
selectionForeground → Color?
Optional override for selection highlight text color.
final

Methods

copyWith({Color? foreground, bool clearForeground = false, Color? background, bool clearBackground = false, Color? cursorColor, bool clearCursorColor = false, Color? cursorTextColor, bool clearCursorTextColor = false, Color? selectionBackground, bool clearSelectionBackground = false, Color? selectionForeground, bool clearSelectionForeground = false, Map<int, Color>? ansiOverrides}) → CustomPaletteOverrides
Returns a copy with one named semantic override updated (clear* clears to null).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serializes active overrides to #RRGGBB hex strings.
toString() → String
A string representation of this object.
inherited
withAnsiSlot(int ansiIndex, Color? color) → CustomPaletteOverrides
Returns a copy with ansiIndex (0..15) set to color (or cleared when null).

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

formatHexRgb(Color color) → String
Formats color as #RRGGBB uppercase hex.
fromJson(Object? raw) → CustomPaletteOverrides
Parses overrides from a JSON map, ignoring invalid entries safely.
parseHexRgb(String raw) → Color?
Parses #RRGGBB or RRGGBB hex strings into an opaque Color.

Constants

empty → const CustomPaletteOverrides
Empty override set leaving the underlying preset untouched.