AsciiColour class
One entry of the 256-colour table, which the terminal can paint into any of three places.
A colour is not a printable code by itself — pick fg, bg or underline and you get the string to print. AsciiColourRgb is the same idea for the 24-bit colours.
Constructors
- AsciiColour(int index)
-
Wraps a table position. The 256 already named are on colours; reach for
this only to compute an index.
const
- AsciiColour.gray(int step)
-
One of the 24 greys,
0near-black through23near-white.const - AsciiColour.grey(int step)
-
AsciiColour.gray under the other spelling.
const
- AsciiColour.rgb(int red, int green, int blue)
-
A colour of the 6x6x6 cube, each channel
0-5.const
Properties
- bg → String
-
Paints the background behind the text. Cleared by RESET_BG or by
reset.
no setterinherited
- fg → String
-
Paints the text this colour. Cleared by RESET_FG or by reset.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- index → int
-
Position in the 256-colour table,
0-255.final - parameters → String
-
The colour half of the code, between the
38/48/58and them.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- underline → String
-
Paints the underline this colour, leaving the text its own colour.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
opacity(
double amount, {AsciiInk over = const AsciiColourRgb(0, 0, 0)}) → AsciiColourRgb -
This colour at
amountstrength overover— the fade ANSI has no code for, worked out in advance.inherited -
toRgb(
) → AsciiColourRgb -
The channels this index paints, as far as they can be known.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override