From 02d77ad5ad8f5847df3cb4d44f50f15e8d83700c Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 9 Dec 2021 12:18:18 +0100 Subject: [PATCH] rcfile: recognize fourteen new color names, mostly for subdued shades This is for people for whom the #rgb color codes are too cryptic. --- src/rcfile.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/rcfile.c b/src/rcfile.c index ec74b3ca..52351d09 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1005,7 +1005,7 @@ short closest_index_color(short red, short green, short blue) return THE_DEFAULT; } -#define COLORCOUNT 20 +#define COLORCOUNT 34 const char hues[COLORCOUNT][8] = { "red", "green", "blue", "yellow", "cyan", "magenta", @@ -1013,12 +1013,19 @@ const char hues[COLORCOUNT][8] = { "red", "green", "blue", "pink", "purple", "mauve", "lagoon", "mint", "lime", "peach", "orange", "latte", + "rosy", "beet", "plum", + "sea", "sky", "slate", + "teal", "sage", "brown", + "ocher", "sand", "tawny", + "brick", "crimson", "grey", "gray" }; short indices[COLORCOUNT] = { COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_CYAN, COLOR_MAGENTA, COLOR_WHITE, COLOR_BLACK, THE_DEFAULT, 204, 163, 134, 38, 48, 148, 215, 208, 137, + 175, 127, 98, 32, 111, 66, 35, 107, 100, + 142, 186, 136, 166, 161, COLOR_BLACK + 8, COLOR_BLACK + 8 }; /* Return the short value corresponding to the given color name, and set