Import std.term.style
TermColor
struct
Public Struct TermColor Implements Hashable, Printable
A color for text, or for what's behind it: the terminal's NORMAL one, its zero; one of the 16 BASIC ones or 256 INDEXED ones, by its Index; or RGB's R, G, and B. A terminal that shows fewer colors gets the nearest it has, as Nearest gives it.
-
Whether it's the terminal's own, a basic one, an indexed one, or RGB.
-
A BASIC or INDEXED color's index.
-
An RGB color's red.
-
An RGB color's green.
-
An RGB color's blue.
-
The terminal's own color, for text or what's behind it.
-
Black, a basic color.
-
Red, a basic color.
-
Green, a basic color.
-
Yellow, a basic color.
-
Blue, a basic color.
-
Magenta, a basic color.
-
Cyan, a basic color.
-
White, a basic color.
-
Bright black, which most terminals show as gray.
-
Bright red, a basic color.
-
Bright green, a basic color.
-
Bright yellow, a basic color.
-
Bright blue, a basic color.
-
Bright magenta, a basic color.
-
Bright cyan, a basic color.
-
Bright white, a basic color.
-
One of the 16 basic colors by its number: black, red, green, yellow, blue, magenta, cyan, and white from 0 to 7, and their bright ones from 8 to 15. Panics past 15.
-
One of 256 colors by its number: the 16 basic ones, then a cube of 6 reds by 6 greens by 6 blues from 16 to 231, and 24 grays, darkest first, from 232 to 255.
-
Red, green, and blue, from 0 to 255 each.
-
The color hex
textgives, as CSS writes one: "#rgb" or "#rrggbb", with or without the "#", in either case. Any other text panics; TryHex takestextfrom outside the program. -
The color hex
textgives, as Hex takes it, or Null fortextthat isn't one. -
Its red, green, and blue: an RGB color's own, and for another, what xterm shows it as. The terminal's NORMAL color has none of its own, so it's black's.
-
The color as a terminal that shows
level's colors shows it: itself, where it has it, or the nearest one it has, by red, green, and blue. NONE has none, so it's NORMAL there. -
"normal", "red", "bright red", "color 208", or "#ff8800".
Report an issue with this page or with FutureBlitz on GitHub.