Ansi1BitColor enum
1-bit ANSI supported foreground and background colors on most terminals.
This enum may be used to constrain possible colors in an API, i.e.:
void drawText(String message, {Ansi1BitColors? color}) { /* ... */ }
On platforms where 8 more colors are available (called "bright", or "high intensity") you may additionally use brightForeground or brightBackground.
Where possible, members describe their colors using xterm's RGB value.
Constructors
- Ansi1BitColor()
-
const
Values
- black → const Ansi1BitColor
-
Represents "black",
(0, 0, 0)
in xterm RGB and varies elsewhere.When bright,
(127, 127, 127)
. - red → const Ansi1BitColor
-
Represents "red",
(205, 0, 0)
in xterm RGB and varies elsewhere.When bright,
(255, 0, 0)
. - green → const Ansi1BitColor
-
Represents "green",
(0, 205, 0)
in xterm RGB and varies elsewhere.When bright,
(0, 255, 0)
. - yellow → const Ansi1BitColor
-
Represents "yellow",
(205, 205, 0)
in xterm RGB and varies elsewhere.When bright,
(255, 255, 0)
. - blue → const Ansi1BitColor
-
Represents "blue",
(0, 0, 238)
in xterm RGB and varies elsewhere.When bright,
(92, 92, 255)
. - magenta → const Ansi1BitColor
-
Represents "magenta",
(205, 0, 205)
in xterm RGB and varies elsewhere.When bright,
(255, 0, 255)
. - cyan → const Ansi1BitColor
-
Represents "cyan",
(0, 205, 205)
in xterm RGB and varies elsewhere.When bright,
(0, 255, 255)
. - white → const Ansi1BitColor
-
Represents "white",
(229, 229, 229)
in xterm RGB and varies elsewhere.When bright,
(255, 255, 255)
.
Properties
- background → int
-
Escape sequence value representing this color as background color.
no setter
- brightBackground → int
-
Escape sequence value representing this color as bright background color.
no setter
- brightForeground → int
-
Escape sequence value representing this color as bright foreground color.
no setter
- foreground → int
-
Escape sequence value representing this color as foreground color.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Constants
-
values
→ const List<
Ansi1BitColor> - A constant List of the values in this enum, in order of their declaration.