diff options
author | Andinus <andinus@nand.sh> | 2020-06-13 21:01:07 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-06-13 21:01:07 +0530 |
commit | 8a0adbbee71d99f09094a82c4c8206567118f042 (patch) | |
tree | 8b760dd3d2ad3af9ebf87ce1410e4160c30eed1c | |
parent | 57ad6c3eeb47564eb634aac8930bb4b40964f825 (diff) | |
download | ara-8a0adbbee71d99f09094a82c4c8206567118f042.tar.gz |
Add more colors to output
This also tunes the colors a bit.
-rwxr-xr-x | ara.pl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ara.pl b/ara.pl index e3492cd..f179044 100755 --- a/ara.pl +++ b/ara.pl @@ -204,9 +204,12 @@ foreach my $i ( 0 ... $rows_to_print - 1 ) { and not $no_delta ) { my $delta_confirmed = $statewise->[$i]{deltaconfirmed}; if ( $delta_confirmed > 1000 ) { + $confirmed .= LOCALCOLOR ON_MAGENTA + sprintf " (%+d)", $statewise->[$i]{deltaconfirmed}; + } elsif ( $delta_confirmed > 500 ) { $confirmed .= LOCALCOLOR BRIGHT_MAGENTA sprintf " (%+d)", $statewise->[$i]{deltaconfirmed}; - } elsif ( $delta_confirmed > 500 ) { + } elsif ( $delta_confirmed > 100 ) { $confirmed .= LOCALCOLOR MAGENTA sprintf " (%+d)", $statewise->[$i]{deltaconfirmed}; } else { @@ -215,9 +218,12 @@ foreach my $i ( 0 ... $rows_to_print - 1 ) { my $delta_recovered = $statewise->[$i]{deltarecovered}; if ( $delta_recovered > 1000 ) { - $recovered .= LOCALCOLOR BRIGHT_GREEN + $recovered .= LOCALCOLOR ON_GREEN sprintf " (%+d)", $statewise->[$i]{deltarecovered}; } elsif ( $delta_recovered > 500 ) { + $recovered .= LOCALCOLOR BRIGHT_GREEN + sprintf " (%+d)", $statewise->[$i]{deltarecovered}; + } elsif ( $delta_recovered > 100 ) { $recovered .= LOCALCOLOR GREEN sprintf " (%+d)", $statewise->[$i]{deltarecovered}; } else { @@ -226,10 +232,14 @@ foreach my $i ( 0 ... $rows_to_print - 1 ) { my $delta_deaths = $statewise->[$i]{deltadeaths}; if ( $delta_deaths > 100 ) { - $state = LOCALCOLOR BLACK ON_RED $state; - $deaths .= LOCALCOLOR BRIGHT_RED + $state = LOCALCOLOR ON_RED $state; + $deaths .= LOCALCOLOR ON_RED sprintf " (%+d)", $statewise->[$i]{deltadeaths}; } elsif ( $delta_deaths > 50 ) { + $state = LOCALCOLOR BRIGHT_RED $state; + $deaths .= LOCALCOLOR BRIGHT_RED + sprintf " (%+d)", $statewise->[$i]{deltadeaths}; + } elsif ( $delta_deaths > 25 ) { $state = LOCALCOLOR RED $state; $deaths .= LOCALCOLOR RED sprintf " (%+d)", $statewise->[$i]{deltadeaths}; |