aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc_src/set_color.txt6
-rw-r--r--src/color.cpp16
2 files changed, 16 insertions, 6 deletions
diff --git a/doc_src/set_color.txt b/doc_src/set_color.txt
index 66855073..5480247c 100644
--- a/doc_src/set_color.txt
+++ b/doc_src/set_color.txt
@@ -7,9 +7,9 @@ set_color [OPTIONS] [COLOR]
\subsection set_color-description Description
-`set_color` changes the foreground and/or background color of the terminal. `COLOR` is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal.
+`set_color` changes the foreground and/or background color of the terminal. `COLOR` is one of `black`, `red`, `green`, `brown`, `yellow`, `blue`, `magenta`, `purple`, `cyan`, `brred`, `brgreen`, `brbrown`, `bryellow`, `brblue`, `brmagenta`, `brpurple`, `brcyan`, `white` and `normal`. The `br`, bright, forms are most useful as background colors.
-If your terminal supports term256 (modern xterms and OS X Lion), you can specify an RGB value with three or six hex digits, such as A0FF33 or f2f. `fish` will choose the closest supported color.
+If your terminal supports term256 (modern xterms and OS X Terminal and iTerm2), you can specify an RGB value with three or six hex digits, such as A0FF33 or f2f. `fish` will choose the closest supported color. A three digit value is equivalent to specifying each digit twice; e.g., `#2BC` is the same as `#22BBCC`. Hex RGB values can be in lower or uppercase, optionally prefixed with the pound-sign character.
The following options are available:
@@ -24,7 +24,7 @@ The following options are available:
Calling `set_color normal` will set the terminal color to the default color of the terminal.
-Some terminals use the `--bold` escape sequence to switch to a brighter color set. On such terminals, `set_color white` will result in a grey font color, while `set_color --bold white` will result in a white font color.
+Some terminals use the `--bold` escape sequence to switch to a brighter color set rather than bolding the characters.
Not all terminal emulators support all these features.
diff --git a/src/color.cpp b/src/color.cpp
index d076ea17..e19fb994 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -160,7 +160,7 @@ struct named_color_t
unsigned char rgb[3];
};
-static const named_color_t named_colors[11] =
+static const named_color_t named_colors[] =
{
{L"black", 0, {0, 0, 0}},
{L"red", 1, {0xFF, 0, 0}},
@@ -171,8 +171,18 @@ static const named_color_t named_colors[11] =
{L"magenta", 5, {0xFF, 0, 0xFF}},
{L"purple", 5, {0xFF, 0, 0xFF}},
{L"cyan", 6, {0, 0xFF, 0xFF}},
- {L"white", 7, {0xFF, 0xFF, 0xFF}},
- {L"normal", 8, {0xFF, 0xFF, 0XFF}}
+ {L"grey", 7, {0xE5, 0xE5, 0xE5}},
+ {L"normal", 7, {0xE5, 0xE5, 0XE5}},
+ {L"brgrey", 8, {0x55, 0x55, 0x55}},
+ {L"brred", 9, {0xFF, 0x55, 0x55}},
+ {L"brgreen", 10, {0x55, 0xFF, 0x55}},
+ {L"brbrown", 11, {0xFF, 0xFF, 0x55}},
+ {L"bryellow", 11, {0xFF, 0xFF, 0x55}},
+ {L"brblue", 12, {0x55, 0x55, 0xFF}},
+ {L"brmagenta", 13, {0xFF, 0x55, 0xFF}},
+ {L"brpurple", 13, {0xFF, 0x55, 0xFF}},
+ {L"brcyan", 14, {0x55, 0xFF, 0xFF}},
+ {L"white", 15, {0xFF, 0xFF, 0xFF}},
};
wcstring_list_t rgb_color_t::named_color_names(void)