]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
terminal-util: reduce colors we define a bit
authorLennart Poettering <lennart@poettering.net>
Fri, 10 May 2019 18:55:59 +0000 (14:55 -0400)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 May 2019 19:00:55 +0000 (15:00 -0400)
three of these colors we never use, so let's drop them. Let's however
add a highlight version of grey, so that at least for all colors we do
define we have all possible styles defined.

src/basic/terminal-util.h

index 6a77e5ebb9bccb65c0e4b155c463c7607d9005e3..90de9a479e91f2c6d07b8116cd62a869fdfc2a2e 100644 (file)
 #include "time-util.h"
 
 /* Regular colors */
-#define ANSI_BLACK   "\x1B[0;30m"
 #define ANSI_RED     "\x1B[0;31m"
 #define ANSI_GREEN   "\x1B[0;32m"
 #define ANSI_YELLOW  "\x1B[0;33m"
 #define ANSI_BLUE    "\x1B[0;34m"
 #define ANSI_MAGENTA "\x1B[0;35m"
-#define ANSI_CYAN    "\x1B[0;36m"
-#define ANSI_WHITE   "\x1B[0;37m"
 #define ANSI_GREY    "\x1B[0;38;5;245m"
 
 /* Bold/highlighted */
-#define ANSI_HIGHLIGHT_BLACK   "\x1B[0;1;30m"
 #define ANSI_HIGHLIGHT_RED     "\x1B[0;1;31m"
 #define ANSI_HIGHLIGHT_GREEN   "\x1B[0;1;32m"
 #define ANSI_HIGHLIGHT_YELLOW  "\x1B[0;1;33m"
 #define ANSI_HIGHLIGHT_BLUE    "\x1B[0;1;34m"
 #define ANSI_HIGHLIGHT_MAGENTA "\x1B[0;1;35m"
-#define ANSI_HIGHLIGHT_CYAN    "\x1B[0;1;36m"
-#define ANSI_HIGHLIGHT_WHITE   "\x1B[0;1;37m"
+#define ANSI_HIGHLIGHT_GREY    "\x1B[0;1;38;5;245m"
 
 /* Underlined */
-#define ANSI_HIGHLIGHT_BLACK_UNDERLINE   "\x1B[0;1;4;30m"
 #define ANSI_HIGHLIGHT_RED_UNDERLINE     "\x1B[0;1;4;31m"
 #define ANSI_HIGHLIGHT_GREEN_UNDERLINE   "\x1B[0;1;4;32m"
 #define ANSI_HIGHLIGHT_YELLOW_UNDERLINE  "\x1B[0;1;4;33m"
 #define ANSI_HIGHLIGHT_BLUE_UNDERLINE    "\x1B[0;1;4;34m"
 #define ANSI_HIGHLIGHT_MAGENTA_UNDERLINE "\x1B[0;1;4;35m"
-#define ANSI_HIGHLIGHT_CYAN_UNDERLINE    "\x1B[0;1;4;36m"
-#define ANSI_HIGHLIGHT_WHITE_UNDERLINE   "\x1B[0;1;4;37m"
+#define ANSI_HIGHLIGHT_GREY_UNDERLINE    "\x1B[0;1;4;38;5;245m"
 
 /* Other ANSI codes */
 #define ANSI_UNDERLINE "\x1B[0;4m"