]> granicus.if.org Git - sysstat/commitdiff
Fix #151: sar: Default colors are suboptimal for light backgrounds
authorSebastien GODARD <sysstat@users.noreply.github.com>
Wed, 24 May 2017 12:03:10 +0000 (14:03 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Wed, 24 May 2017 12:03:10 +0000 (14:03 +0200)
Default colors are suboptimal for terminals with light backgrounds.
Change them so that they can usable on both dark and light terminal
backgrounds.

Reported-by: Peter Schiffer
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
common.c
common.h

index dfed735aa23f889bcab056ce506d628d218abaee..4df4936fd6e967adf4b22a46868025325a07b8f7 100644 (file)
--- a/common.c
+++ b/common.c
@@ -57,12 +57,12 @@ unsigned int kb_shift;
 
 /* Colors strings */
 char sc_percent_high[MAX_SGR_LEN] = C_BOLD_RED;
-char sc_percent_low[MAX_SGR_LEN] = C_BOLD_BLUE;
-char sc_zero_int_stat[MAX_SGR_LEN] = C_LIGHT_YELLOW;
-char sc_int_stat[MAX_SGR_LEN] = C_BOLD_YELLOW;
+char sc_percent_low[MAX_SGR_LEN] = C_BOLD_MAGENTA;
+char sc_zero_int_stat[MAX_SGR_LEN] = C_LIGHT_BLUE;
+char sc_int_stat[MAX_SGR_LEN] = C_BOLD_BLUE;
 char sc_item_name[MAX_SGR_LEN] = C_LIGHT_GREEN;
 char sc_sa_restart[MAX_SGR_LEN] = C_LIGHT_RED;
-char sc_sa_comment[MAX_SGR_LEN] = C_LIGHT_CYAN;
+char sc_sa_comment[MAX_SGR_LEN] = C_LIGHT_YELLOW;
 char sc_normal[MAX_SGR_LEN] = C_NORMAL;
 
 /* Type of persistent device names used in sar and iostat */
index fb090ed8fa3d714304e7c2332c8eb183bca6d87d..73a5bb0e7bfc9c612fe1dfb4c5433d525f9e2e24 100644 (file)
--- a/common.h
+++ b/common.h
@@ -194,9 +194,9 @@ extern char persistent_name_type[MAX_FILE_LEN];
 #define C_BOLD_RED     "\e[31;1m"
 #define C_LIGHT_GREEN  "\e[32;22m"
 #define C_LIGHT_YELLOW "\e[33;22m"
-#define C_BOLD_YELLOW  "\e[33;1m"
+#define C_BOLD_MAGENTA "\e[35;1m"
 #define C_BOLD_BLUE    "\e[34;1m"
-#define C_LIGHT_CYAN   "\e[36;22m"
+#define C_LIGHT_BLUE   "\e[34;22m"
 #define C_NORMAL       "\e[0m"
 
 #define PERCENT_LIMIT_HIGH     75.0