AnsiColor enum
ANSI colors for console output.
Provides constants for color formatting using ANSI escape sequences.
Example:
print('${AnsiColor.green.code}Green text${AnsiColor.reset.code}');
print('${AnsiColor.bold.code}${AnsiColor.red.code}Bold red${AnsiColor.reset.code}');
Values
- reset → const AnsiColor
-
const AnsiColor('\x1B[0m') - bold → const AnsiColor
-
const AnsiColor('\x1B[1m') - italic → const AnsiColor
-
const AnsiColor('\x1B[3m') - underline → const AnsiColor
-
const AnsiColor('\x1B[4m') - strikethrough → const AnsiColor
-
const AnsiColor('\x1B[9m') - black → const AnsiColor
-
const AnsiColor('\x1B[0;30m') - red → const AnsiColor
-
const AnsiColor('\x1B[0;31m') - green → const AnsiColor
-
const AnsiColor('\x1B[0;32m') - yellow → const AnsiColor
-
const AnsiColor('\x1B[0;33m') - blue → const AnsiColor
-
const AnsiColor('\x1B[0;34m') - magenta → const AnsiColor
-
const AnsiColor('\x1B[0;35m') - cyan → const AnsiColor
-
const AnsiColor('\x1B[0;36m') - white → const AnsiColor
-
const AnsiColor('\x1B[0;37m') - boldBlack → const AnsiColor
-
const AnsiColor('\x1B[1;30m') - boldRed → const AnsiColor
-
const AnsiColor('\x1B[1;31m') - boldGreen → const AnsiColor
-
const AnsiColor('\x1B[1;32m') - boldYellow → const AnsiColor
-
const AnsiColor('\x1B[1;33m') - boldBlue → const AnsiColor
-
const AnsiColor('\x1B[1;34m') - boldMagenta → const AnsiColor
-
const AnsiColor('\x1B[1;35m') - boldCyan → const AnsiColor
-
const AnsiColor('\x1B[1;36m') - boldWhite → const AnsiColor
-
const AnsiColor('\x1B[1;37m') - underlineBlack → const AnsiColor
-
const AnsiColor('\x1B[4;30m') - underlineRed → const AnsiColor
-
const AnsiColor('\x1B[4;31m') - underlineGreen → const AnsiColor
-
const AnsiColor('\x1B[4;32m') - underlineYellow → const AnsiColor
-
const AnsiColor('\x1B[4;33m') - underlineBlue → const AnsiColor
-
const AnsiColor('\x1B[4;34m') - underlineMagenta → const AnsiColor
-
const AnsiColor('\x1B[4;35m') - underlineCyan → const AnsiColor
-
const AnsiColor('\x1B[4;36m') - underlineWhite → const AnsiColor
-
const AnsiColor('\x1B[4;37m') - bgBlack → const AnsiColor
-
const AnsiColor('\x1B[40m') - bgRed → const AnsiColor
-
const AnsiColor('\x1B[41m') - bgGreen → const AnsiColor
-
const AnsiColor('\x1B[42m') - bgYellow → const AnsiColor
-
const AnsiColor('\x1B[43m') - bgBlue → const AnsiColor
-
const AnsiColor('\x1B[44m') - bgMagenta → const AnsiColor
-
const AnsiColor('\x1B[45m') - bgCyan → const AnsiColor
-
const AnsiColor('\x1B[46m') - bgWhite → const AnsiColor
-
const AnsiColor('\x1B[47m') - brightBlack → const AnsiColor
-
const AnsiColor('\x1B[0;90m') - brightRed → const AnsiColor
-
const AnsiColor('\x1B[0;91m') - brightGreen → const AnsiColor
-
const AnsiColor('\x1B[0;92m') - brightYellow → const AnsiColor
-
const AnsiColor('\x1B[0;93m') - brightBlue → const AnsiColor
-
const AnsiColor('\x1B[0;94m') - brightMagenta → const AnsiColor
-
const AnsiColor('\x1B[0;95m') - brightCyan → const AnsiColor
-
const AnsiColor('\x1B[0;96m') - brightWhite → const AnsiColor
-
const AnsiColor('\x1B[0;97m') - boldBrightBlack → const AnsiColor
-
const AnsiColor('\x1B[1;90m') - boldBrightRed → const AnsiColor
-
const AnsiColor('\x1B[1;91m') - boldBrightGreen → const AnsiColor
-
const AnsiColor('\x1B[1;92m') - boldBrightYellow → const AnsiColor
-
const AnsiColor('\x1B[1;93m') - boldBrightBlue → const AnsiColor
-
const AnsiColor('\x1B[1;94m') - boldBrightMagenta → const AnsiColor
-
const AnsiColor('\x1B[1;95m') - boldBrightCyan → const AnsiColor
-
const AnsiColor('\x1B[1;96m') - boldBrightWhite → const AnsiColor
-
const AnsiColor('\x1B[1;97m') - bgBrightBlack → const AnsiColor
-
const AnsiColor('\x1B[0;100m') - bgBrightRed → const AnsiColor
-
const AnsiColor('\x1B[0;101m') - bgBrightGreen → const AnsiColor
-
const AnsiColor('\x1B[0;102m') - bgBrightYellow → const AnsiColor
-
const AnsiColor('\x1B[0;103m') - bgBrightBlue → const AnsiColor
-
const AnsiColor('\x1B[0;104m') - bgBrightMagenta → const AnsiColor
-
const AnsiColor('\x1B[0;105m') - bgBrightCyan → const AnsiColor
-
const AnsiColor('\x1B[0;106m') - bgBrightWhite → const AnsiColor
-
const AnsiColor('\x1B[0;107m')
Properties
- code → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
combine(
AnsiColor other) → String - Combines the current color with another style.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
wrap(
String text) → String - Wraps text with the color and resets it automatically.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited