Color class

A terminal color using ANSI 16-color palette values (0–15).

Use Color.transparent (-1) to indicate no color. See also Colors for named constants.

Constructors

Color(int value)
Creates a Color with the given ANSI value.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
The ANSI color value (0–15), or -1 for transparent.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

black → const Color
Black (ANSI 0).
blue → const Color
Blue (ANSI 4).
brightBlack → const Color
Bright black / dark gray (ANSI 8).
brightBlue → const Color
Bright blue (ANSI 12).
brightCyan → const Color
Bright cyan (ANSI 14).
brightGreen → const Color
Bright green (ANSI 10).
brightMagenta → const Color
Bright magenta (ANSI 13).
brightRed → const Color
Bright red (ANSI 9).
brightWhite → const Color
Bright white (ANSI 15).
brightYellow → const Color
Bright yellow (ANSI 11).
cyan → const Color
Cyan (ANSI 6).
green → const Color
Green (ANSI 2).
magenta → const Color
Magenta (ANSI 5).
red → const Color
Red (ANSI 1).
transparent → const Color
No color (value -1).
white → const Color
White (ANSI 7).
yellow → const Color
Yellow (ANSI 3).