Support bright named colors
This commit is contained in:
parent
6740e3cc0c
commit
2b44e93f79
|
@ -1046,6 +1046,7 @@ fg_color[,bg_color][+attributes]
|
||||||
fg_color and bg_color can be:
|
fg_color and bg_color can be:
|
||||||
|
|
||||||
* A named color: `black, red, green, yellow, blue, magenta, cyan, white`.
|
* A named color: `black, red, green, yellow, blue, magenta, cyan, white`.
|
||||||
|
* A named bright color: `brblack, brred, brgreen, bryellow, brblue, brmagenta, brcyan, brwhite`.
|
||||||
* `default`, which keeps the existing color
|
* `default`, which keeps the existing color
|
||||||
* An rgb color: `rgb:RRGGBB`, with RRGGBB the hexadecimal value of the color.
|
* An rgb color: `rgb:RRGGBB`, with RRGGBB the hexadecimal value of the color.
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,14 @@ static constexpr const char* color_names[] = {
|
||||||
"magenta",
|
"magenta",
|
||||||
"cyan",
|
"cyan",
|
||||||
"white",
|
"white",
|
||||||
|
"brblack",
|
||||||
|
"brred",
|
||||||
|
"brgreen",
|
||||||
|
"bryellow",
|
||||||
|
"brblue",
|
||||||
|
"brmagenta",
|
||||||
|
"brcyan",
|
||||||
|
"brwhite",
|
||||||
};
|
};
|
||||||
|
|
||||||
bool is_color_name(StringView color)
|
bool is_color_name(StringView color)
|
||||||
|
|
|
@ -22,6 +22,14 @@ struct Color
|
||||||
Magenta,
|
Magenta,
|
||||||
Cyan,
|
Cyan,
|
||||||
White,
|
White,
|
||||||
|
BrBlack,
|
||||||
|
BrRed,
|
||||||
|
BrGreen,
|
||||||
|
BrYellow,
|
||||||
|
BrBlue,
|
||||||
|
BrMagenta,
|
||||||
|
BrCyan,
|
||||||
|
BrWhite,
|
||||||
RGB,
|
RGB,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -238,6 +238,14 @@ default_colors = {
|
||||||
{ Color::Magenta, COLOR_MAGENTA },
|
{ Color::Magenta, COLOR_MAGENTA },
|
||||||
{ Color::Cyan, COLOR_CYAN },
|
{ Color::Cyan, COLOR_CYAN },
|
||||||
{ Color::White, COLOR_WHITE },
|
{ Color::White, COLOR_WHITE },
|
||||||
|
{ Color::BrBlack, 8 },
|
||||||
|
{ Color::BrRed, 9 },
|
||||||
|
{ Color::BrGreen, 10 },
|
||||||
|
{ Color::BrYellow, 11 },
|
||||||
|
{ Color::BrBlue, 12 },
|
||||||
|
{ Color::BrMagenta, 13 },
|
||||||
|
{ Color::BrCyan, 14 },
|
||||||
|
{ Color::BrWhite, 15 },
|
||||||
};
|
};
|
||||||
|
|
||||||
NCursesUI::NCursesUI()
|
NCursesUI::NCursesUI()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user