Another update to HTML colors
For the most part I used the RGB values for xterm from https://en.wikipedia.org/wiki/ANSI_escape_code#Colors for the HTML colors, but with a few exceptions. For example, I did not use "yellow" for `pr_svrty_low()`, since that color is very difficult to read. I also used a different color for `pr_svrty_medium()` so that `pr_svrty_medium()` would appear more red than `pr_svrty_low()`. These color choices could use more adjustment.
This commit is contained in:
parent
be6bafaec4
commit
1c5ef78913
20
testssl.sh
20
testssl.sh
|
@ -590,16 +590,16 @@ retstring(){
|
|||
|
||||
# color print functions, see also http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
|
||||
pr_liteblue_term() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out_term "\033[0;32m$1" || out_term "\033[0;34m$1" ) || out_term "$1"; pr_off; } # not yet used
|
||||
pr_liteblue() { pr_liteblue_term "$1"; out_html "<span style=\"color:lightblue;\">$1</span>"; }
|
||||
pr_liteblue() { pr_liteblue_term "$1"; "$COLORBLIND" && out_html "<span style=\"color:#00cd00;\">$1</span>" || out_html "<span style=\"color:#0000ee;\">$1</span>"; }
|
||||
pr_liteblueln_term() { pr_liteblue_term "$1"; outln_term; }
|
||||
pr_liteblueln() { pr_liteblue "$1"; outln; }
|
||||
pr_blue_term() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out_term "\033[1;32m$1" || out_term "\033[1;34m$1" ) || out_term "$1"; pr_off; } # used for head lines of single tests
|
||||
pr_blue() { pr_blue_term "$1"; out_html "<span style=\"color:blue;font-weight:bold;\">$1</span>"; }
|
||||
pr_blue() { pr_blue_term "$1"; "$COLORBLIND" && out_html "<span style=\"color:lime;font-weight:bold;\">$1</span>" || out_html "<span style=\"color:#5c5cff;font-weight:bold;\">$1</span>"; }
|
||||
pr_blueln_term() { pr_blue_term "$1"; outln_term; }
|
||||
pr_blueln() { pr_blue "$1"; outln; }
|
||||
|
||||
pr_warning_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[0;35m$1" || pr_underline_term "$1"; pr_off; } # some local problem: one test cannot be done
|
||||
pr_warning() { pr_warning_term "$1"; out_html "<span style=\"color:magenta;\">$1</span>"; }
|
||||
pr_warning() { pr_warning_term "$1"; out_html "<span style=\"color:#cd00cd;\">$1</span>"; }
|
||||
pr_warningln_term() { pr_warning_term "$1"; outln_term; } # litemagenta
|
||||
pr_warningln() { pr_warning "$1"; outln; }
|
||||
pr_magenta_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[1;35m$1" || pr_underline_term "$1"; pr_off; } # fatal error: quitting because of this!
|
||||
|
@ -608,7 +608,7 @@ pr_magentaln_term() { pr_magenta_term "$1"; outln_term; }
|
|||
pr_magentaln() { pr_magenta "$1"; outln; }
|
||||
|
||||
pr_litecyan_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[0;36m$1" || out_term "$1"; pr_off; } # not yet used
|
||||
pr_litecyan() { pr_litecyan_term "$1"; out_html "<span style=\"color:lightcyan;\">$1</span>"; }
|
||||
pr_litecyan() { pr_litecyan_term "$1"; out_html "<span style=\"color:#00cdcd;\">$1</span>"; }
|
||||
pr_litecyanln_term() { pr_litecyan_term "$1"; outln_term; }
|
||||
pr_litecyanln() { pr_litecyan "$1"; outln; }
|
||||
pr_cyan_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[1;36m$1" || out_term "$1"; pr_off; } # additional hint
|
||||
|
@ -621,30 +621,30 @@ pr_litegreyln() { pr_litegrey "$1"; outln; }
|
|||
pr_litegrey_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[0;37m$1" || out_term "$1"; pr_off; } # ... https://github.com/drwetter/testssl.sh/pull/600#issuecomment-276129876
|
||||
pr_litegrey() { pr_litegrey_term "$1"; out_html "<span style=\"color:darkgray;\">$1</span>"; }
|
||||
pr_grey_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[1;30m$1" || out_term "$1"; pr_off; }
|
||||
pr_grey() { pr_grey_term "$1"; out_html "<span style=\"color:grey;font-weight:bold;\">$1</span>"; }
|
||||
pr_grey() { pr_grey_term "$1"; out_html "<span style=\"color:#7f7f7f;font-weight:bold;\">$1</span>"; }
|
||||
pr_greyln_term() { pr_grey_term "$1"; outln_term; }
|
||||
pr_greyln() { pr_grey "$1"; outln; }
|
||||
|
||||
pr_done_good_term() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out_term "\033[0;34m$1" || out_term "\033[0;32m$1" ) || out_term "$1"; pr_off; } # litegreen (liteblue), This is good
|
||||
pr_done_good() { pr_done_good_term "$1"; out_html "<span style=\"color:green;\">$1</span>"; }
|
||||
pr_done_good() { pr_done_good_term "$1"; "$COLORBLIND" && out_html "<span style=\"color:#0000ee;\">$1</span>" || out_html "<span style=\"color:#00cd00;\">$1</span>"; }
|
||||
pr_done_goodln_term() { pr_done_good_term "$1"; outln_term; }
|
||||
pr_done_goodln() { pr_done_good "$1"; outln; }
|
||||
pr_done_best_term() { [[ "$COLOR" -eq 2 ]] && ( "$COLORBLIND" && out_term "\033[1;34m$1" || out_term "\033[1;32m$1" ) || out_term "$1"; pr_off; } # green (blue), This is the best
|
||||
pr_done_best() { pr_done_best_term "$1"; out_html "<span style=\"color:green;font-weight:bold;\">$1</span>"; }
|
||||
pr_done_best() { pr_done_best_term "$1"; "$COLORBLIND" && out_html "<span style=\"color:#5c5cff;font-weight:bold;\">$1</span>" || out_html "<span style=\"color:lime;font-weight:bold;\">$1</span>"; }
|
||||
pr_done_bestln_term() { pr_done_best_term "$1"; outln_term; }
|
||||
pr_done_bestln() { pr_done_best "$1"; outln; }
|
||||
|
||||
pr_svrty_low_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[1;33m$1" || out_term "$1"; pr_off; } # yellow brown | academic or minor problem
|
||||
pr_svrty_low() { pr_svrty_low_term "$1"; out_html "<span style=\"color:yellow;font-weight:bold;\">$1</span>"; }
|
||||
pr_svrty_low() { pr_svrty_low_term "$1"; out_html "<span style=\"color:#cdcd00;font-weight:bold;\">$1</span>"; }
|
||||
pr_svrty_lowln_term() { pr_svrty_low_term "$1"; outln_term; }
|
||||
pr_svrty_lowln() { pr_svrty_low "$1"; outln; }
|
||||
pr_svrty_medium_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[0;33m$1" || out_term "$1"; pr_off; } # brown | it is not a bad problem but you shouldn't do this
|
||||
pr_svrty_medium() { pr_svrty_medium_term "$1"; out_html "<span style=\"color:chocolate;\">$1</span>"; }
|
||||
pr_svrty_medium() { pr_svrty_medium_term "$1"; out_html "<span style=\"color:#cd8000;\">$1</span>"; }
|
||||
pr_svrty_mediumln_term() { pr_svrty_medium_term "$1"; outln_term; }
|
||||
pr_svrty_mediumln() { pr_svrty_medium "$1"; outln; }
|
||||
|
||||
pr_svrty_high_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[0;31m$1" || pr_bold_term "$1"; pr_off; } # litered
|
||||
pr_svrty_high() { pr_svrty_high_term "$1"; out_html "<span style=\"color:red;\">$1</span>"; }
|
||||
pr_svrty_high() { pr_svrty_high_term "$1"; out_html "<span style=\"color:#cd0000;\">$1</span>"; }
|
||||
pr_svrty_highln_term() { pr_svrty_high_term "$1"; outln_term; }
|
||||
pr_svrty_highln() { pr_svrty_high "$1"; outln; }
|
||||
pr_svrty_critical_term() { [[ "$COLOR" -eq 2 ]] && out_term "\033[1;31m$1" || pr_bold_term "$1"; pr_off; } # red
|
||||
|
|
Loading…
Reference in New Issue