AnsiColor class

Helper class to assist in printing text to the console with a color.

Use one of the color functions instead of this class.

See:

Constructors

AnsiColor(int code, {bool bold = true})
const

Properties

bold → bool
do we bold the color
no setter
code → int
ansi code for this color.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(String text, {AnsiColor background = none}) → String
writes the text to the terminal.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

bgReset() → String
resets the background color.
fgReset() → String
resets the foreground color
reset() → String
resets the color scheme.

Constants

black → const AnsiColor
Colors black
blue → const AnsiColor
blue
codeBlack → const int
code for black
codeBlue → const int
code for blue
codeCyan → const int
code for cyan
codeGreen → const int
code for green
codeGrey → const int
code for grey
codeMagenta → const int
code for magenta
codeOrange → const int
code for orange
codeRed → const int
code for red
codeWhite → const int
code for white
codeYellow → const int
code for yellow
cyan → const AnsiColor
cyan
green → const AnsiColor
green
magenta → const AnsiColor
magenta
none → const AnsiColor
passing this as the background color will cause the background code to be suppressed resulting in the default background color.
orange → const AnsiColor
orange
red → const AnsiColor
red
white → const AnsiColor
white
yellow → const AnsiColor
yellow