nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 02d77ad5ad8f5847df3cb4d44f50f15e8d83700c
parent 7ab903f0725d1e69330a54657341185ef3b0eab6
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu,  9 Dec 2021 12:18:18 +0100

rcfile: recognize fourteen new color names, mostly for subdued shades

This is for people for whom the #rgb color codes are too cryptic.

Diffstat:
Msrc/rcfile.c | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 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