AnsiColor extension

Extensions to assist with color ANSI escape codes.

on

Properties

ansiParamsBackground String

Available on Color, provided by the AnsiColor extension

The background ansi espace params for this Color.
no setter
ansiParamsForeground String

Available on Color, provided by the AnsiColor extension

The foreground ansi espace params for this Color.
no setter

Methods

ansiWrap(String string, {bool bg = false}) String

Available on Color, provided by the AnsiColor extension

Returns string wrapped with ansiParamsForeground and defaultForeground or ansiParamsBackground and defaultBackground, depending on bg.

Static Properties

regex RegExp

Available on Color, provided by the AnsiColor extension

Compiled Regular Expression to match ansi codes.
final

Static Methods

build(List<String> params) String

Available on Color, provided by the AnsiColor extension

Joins params into a full ANSI escape sequence.

Constants

defaultBackground → const String
The ANSI escape param to reset background color.
defaultForeground → const String
The ANSI escape param to reset foreground color.
escapePrefix → const String
The ANSI escape code prefix, used to start an ANSI parameter sequence.
escapeSuffix → const String
The ANSI escape code suffix, used to return to normal text output.
notBlinking → const String
The ANSI escape param to disable blinking (the default).
notBold → const String
The ANSI escape param to disable bold (the default).
notHidden → const String
The ANSI escape param to disable hidden (the default).
notInverse → const String
The ANSI escape param to disable inverse (the default).
notUnderlined → const String
The ANSI escape param to disable underline (the default).
regexp → const String
Regular Expression to match ansi codes.