Color4 enum

The base 16 (4-bit) colors available on almost all terminals.

There are 8 original (dim) colors, and 8 bright colors:

Bright/Light Dim/Dark
brightBlack black
brightRed red
brightGreen green
brightYellow yellow
brightBlue blue
brightMagenta magenta
brightCyan cyan
brightWhite white

In practice, most modern terminal emulators support Color8 or Color24, but Color4 is still useful for compatibility with older terminals or for completeness.

Inheritance
Implemented types
Available extensions

Values

black → const Color4

The color black.

red → const Color4

The color red, which is closer to a dark red.

green → const Color4

The color green, which is closer to a dark green.

yellow → const Color4

The color yellow, which is closer to a dark yellow.

blue → const Color4

The color blue, which is closer to a dark blue.

magenta → const Color4

The color magenta, which is closer to a dark magenta.

cyan → const Color4

The color cyan, which is closer to a dark cyan.

white → const Color4

The color white, which is closer to a medium gray.

brightBlack → const Color4

The color bright black, which is closer to a dark gray.

brightRed → const Color4

The color bright red, which is closer to a regular red.

brightGreen → const Color4

The color bright green, which is closer to a regular green.

brightYellow → const Color4

The color bright yellow, which is closer to a regular yellow.

brightBlue → const Color4

The color bright blue, which is closer to a regular blue.

brightMagenta → const Color4

The color bright magenta, which is closer to a regular magenta.

brightCyan → const Color4

The color bright cyan, which is closer to a regular cyan.

brightWhite → const Color4

The color bright white, which is closer to a white.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isBright bool
Whether this color is a bright or light color.
no setter
isDim bool
Whether this color is a dim or dark color.
no setter
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

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

bright → const List<Color4>
A subset of values; 8 bright colors, sometimes called light.
dim → const List<Color4>
A subset of values; 8 original colors, sometimes called dim or dark.
values → const List<Color4>
A constant List of the values in this enum, in order of their declaration.