CustomPaletteOverrides class final
User-defined hex color overrides applied on top of a TerminalColorTheme.
Constructors
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 tonull). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Serializes active overrides to
#RRGGBBhex strings. -
toString(
) → String -
A string representation of this object.
inherited
-
withAnsiSlot(
int ansiIndex, Color? color) → CustomPaletteOverrides -
Returns a copy with
ansiIndex(0..15) set tocolor(or cleared whennull).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
formatHexRgb(
Color color) → String -
Formats
coloras#RRGGBBuppercase hex. -
fromJson(
Object? raw) → CustomPaletteOverrides - Parses overrides from a JSON map, ignoring invalid entries safely.
-
parseHexRgb(
String raw) → Color? -
Parses
#RRGGBBorRRGGBBhex strings into an opaque Color.
Constants
- empty → const CustomPaletteOverrides
- Empty override set leaving the underlying preset untouched.