CompleteColor class
A color with explicit values for each color profile.
Use this when you want full control over color appearance at each capability level, without automatic degradation.
final brand = CompleteColor(
trueColor: '#ff5500',
ansi256: '208',
ansi: '1', // Red as fallback
);
Constructors
- CompleteColor({required String trueColor, String? ansi256, String? ansi})
-
Creates a complete color with per-profile values.
const
Properties
- ansi → String?
-
Basic ANSI color code (as string, 0-7 or 0-15).
final
- ansi256 → String?
-
ANSI-256 color code (as string).
final
- dim → Color
-
Returns a dimmed version of this color (if applicable).
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trueColor → String
-
True color (24-bit) hex value.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toAnsi(
ColorProfile profile, {bool background = false, bool underline = false, bool hasDarkBackground = true}) → String -
Produces the ANSI escape sequence for this color.
override
-
toHex(
) → String -
Returns the hex representation of this color.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override