Skip to content

Commit

Permalink
Fix sysstat#151: sar: Default colors are suboptimal for light backgro…
Browse files Browse the repository at this point in the history
…unds

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 <[email protected]>
  • Loading branch information
sysstat committed May 24, 2017
1 parent d743742 commit daa1e10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit daa1e10

Please sign in to comment.