From a91673be3a84447a1b2d322dd0769420ae5faf63 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 15 Jul 2013 23:20:35 +0000 Subject: [PATCH] Improve foreground contrast with colors. A brightwhite is needed for the white text to have enough contrast. It also allows for non-bright black, which also has better contrast. --- README.rst | 2 +- generate-luts.py | 6 +- luts.h | 300 +++++++++++++++++++++++------------------------ 3 files changed, 154 insertions(+), 154 deletions(-) diff --git a/README.rst b/README.rst index 5ca3d4e..835b2fa 100644 --- a/README.rst +++ b/README.rst @@ -86,7 +86,7 @@ Edit ``$HOME/.tmux.conf`` to display the program's output in *status-left* or *status-right*. For example:: set -g status-interval 2 - set -g status-left "#S #[fg=green,bg=black,bright]#(tmux-mem-cpu-load --colors 2)#[default]" + set -g status-left "#S #[fg=green,bg=black]#(tmux-mem-cpu-load --colors 2)#[default]" Note that the first argument to `tmux-mem-cpu-load` should be the same number of seconds that *status-interval* is set at. diff --git a/generate-luts.py b/generate-luts.py index 477c6e0..8ce00d5 100755 --- a/generate-luts.py +++ b/generate-luts.py @@ -36,8 +36,8 @@ with open('luts.h', 'w') as fp: # hot colormap with white fg for the first half # and black fg for the second half - write_table(fp, 'hot', 'cpu_percentage', 'white', 'black') - write_table(fp, 'gist_earth', 'mem', 'white', 'black') - write_table(fp, 'bone', 'load', 'white', 'black') + write_table(fp, 'hot', 'cpu_percentage', 'brightwhite', 'black') + write_table(fp, 'gist_earth', 'mem', 'brightwhite', 'black') + write_table(fp, 'bone', 'load', 'brightwhite', 'black') fp.write('#endif\n') diff --git a/luts.h b/luts.h index 1bf2945..0c99e08 100644 --- a/luts.h +++ b/luts.h @@ -2,56 +2,56 @@ #define _luts_h static const char cpu_percentage_lut[][32] = { -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour52]", -"#[fg=white,bg=colour88]", -"#[fg=white,bg=colour88]", -"#[fg=white,bg=colour88]", -"#[fg=white,bg=colour88]", -"#[fg=white,bg=colour88]", -"#[fg=white,bg=colour88]", -"#[fg=white,bg=colour88]", -"#[fg=white,bg=colour124]", -"#[fg=white,bg=colour124]", -"#[fg=white,bg=colour124]", -"#[fg=white,bg=colour124]", -"#[fg=white,bg=colour124]", -"#[fg=white,bg=colour124]", -"#[fg=white,bg=colour124]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour160]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour196]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour202]", -"#[fg=white,bg=colour208]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour52]", +"#[fg=brightwhite,bg=colour88]", +"#[fg=brightwhite,bg=colour88]", +"#[fg=brightwhite,bg=colour88]", +"#[fg=brightwhite,bg=colour88]", +"#[fg=brightwhite,bg=colour88]", +"#[fg=brightwhite,bg=colour88]", +"#[fg=brightwhite,bg=colour88]", +"#[fg=brightwhite,bg=colour124]", +"#[fg=brightwhite,bg=colour124]", +"#[fg=brightwhite,bg=colour124]", +"#[fg=brightwhite,bg=colour124]", +"#[fg=brightwhite,bg=colour124]", +"#[fg=brightwhite,bg=colour124]", +"#[fg=brightwhite,bg=colour124]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour160]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour196]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour202]", +"#[fg=brightwhite,bg=colour208]", "#[fg=black,bg=colour208]", "#[fg=black,bg=colour208]", "#[fg=black,bg=colour208]", @@ -106,56 +106,56 @@ static const char cpu_percentage_lut[][32] = { }; // end cpu_percentage_lut static const char mem_lut[][32] = { -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour17]", -"#[fg=white,bg=colour18]", -"#[fg=white,bg=colour18]", -"#[fg=white,bg=colour18]", -"#[fg=white,bg=colour18]", -"#[fg=white,bg=colour18]", -"#[fg=white,bg=colour18]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour24]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour66]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour72]", -"#[fg=white,bg=colour71]", -"#[fg=white,bg=colour71]", -"#[fg=white,bg=colour71]", -"#[fg=white,bg=colour107]", -"#[fg=white,bg=colour107]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour17]", +"#[fg=brightwhite,bg=colour18]", +"#[fg=brightwhite,bg=colour18]", +"#[fg=brightwhite,bg=colour18]", +"#[fg=brightwhite,bg=colour18]", +"#[fg=brightwhite,bg=colour18]", +"#[fg=brightwhite,bg=colour18]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour24]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour66]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour72]", +"#[fg=brightwhite,bg=colour71]", +"#[fg=brightwhite,bg=colour71]", +"#[fg=brightwhite,bg=colour71]", +"#[fg=brightwhite,bg=colour107]", +"#[fg=brightwhite,bg=colour107]", "#[fg=black,bg=colour107]", "#[fg=black,bg=colour107]", "#[fg=black,bg=colour108]", @@ -210,56 +210,56 @@ static const char mem_lut[][32] = { }; // end mem_lut static const char load_lut[][32] = { -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour16]", -"#[fg=white,bg=colour17]", -"#[fg=white,bg=colour17]", -"#[fg=white,bg=colour17]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour59]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour60]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour102]", -"#[fg=white,bg=colour103]", -"#[fg=white,bg=colour103]", -"#[fg=white,bg=colour103]", -"#[fg=white,bg=colour103]", -"#[fg=white,bg=colour103]", -"#[fg=white,bg=colour103]", -"#[fg=white,bg=colour103]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour16]", +"#[fg=brightwhite,bg=colour17]", +"#[fg=brightwhite,bg=colour17]", +"#[fg=brightwhite,bg=colour17]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour59]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour60]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour102]", +"#[fg=brightwhite,bg=colour103]", +"#[fg=brightwhite,bg=colour103]", +"#[fg=brightwhite,bg=colour103]", +"#[fg=brightwhite,bg=colour103]", +"#[fg=brightwhite,bg=colour103]", +"#[fg=brightwhite,bg=colour103]", +"#[fg=brightwhite,bg=colour103]", "#[fg=black,bg=colour103]", "#[fg=black,bg=colour103]", "#[fg=black,bg=colour109]",