about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-07-29 21:22:18 +0530
committerAndinus <andinus@nand.sh>2020-07-29 21:22:18 +0530
commita86b7ddf871b545cb951c58d7dda2cedee80cf2a (patch)
treeb242be539f08b733bf0f2e2fdef381f8b77ffa7c
parent128a1b7edb4c96a4ac2ead7cdeabce042691a374 (diff)
downloadara-a86b7ddf871b545cb951c58d7dda2cedee80cf2a.tar.gz
Change color intensity, remove colors from state column
The numbers are increasing & it made sense to increase values for
bolder colors. Also, I changed from ON_COLOR to BOLD because the
latter looks better. State colors were removed because it wasn't much
helpful.
-rwxr-xr-xara.pl23
1 files changed, 10 insertions, 13 deletions
diff --git a/ara.pl b/ara.pl
index b1766b0..b28cd31 100755
--- a/ara.pl
+++ b/ara.pl
@@ -271,13 +271,13 @@ foreach my $i ( 0 ... scalar @$statewise - 1 ) {
             $_ .= " " for ($confirmed, $recovered, $deaths);
 
             my $delta_confirmed = $statewise->[$i]{deltaconfirmed};
-            if ( $delta_confirmed > 1000 ) {
-                $confirmed .= LOCALCOLOR BLACK ON_MAGENTA
+            if ( $delta_confirmed > 2000 ) {
+                $confirmed .= LOCALCOLOR BOLD MAGENTA
                     sprintf "%+d", $delta_confirmed;
-            } elsif ( $delta_confirmed > 500  ) {
+            } elsif ( $delta_confirmed > 1000  ) {
                 $confirmed .= LOCALCOLOR BRIGHT_MAGENTA
                     sprintf "%+d", $delta_confirmed;
-            } elsif ( $delta_confirmed > 100 ) {
+            } elsif ( $delta_confirmed > 500 ) {
                 $confirmed .= LOCALCOLOR MAGENTA
                     sprintf "%+d", $delta_confirmed;
             } else {
@@ -285,13 +285,13 @@ foreach my $i ( 0 ... scalar @$statewise - 1 ) {
             }
 
             my $delta_recovered = $statewise->[$i]{deltarecovered};
-            if ( $delta_recovered > 1000 ) {
-                $recovered .= LOCALCOLOR BLACK ON_GREEN
+            if ( $delta_recovered > 2000 ) {
+                $recovered .= LOCALCOLOR BOLD GREEN
                     sprintf "%+d", $delta_recovered;
-            } elsif ( $delta_recovered > 500 ) {
+            } elsif ( $delta_recovered > 1000 ) {
                 $recovered .= LOCALCOLOR BRIGHT_GREEN
                     sprintf "%+d", $delta_recovered;
-            } elsif ( $delta_recovered > 100 ) {
+            } elsif ( $delta_recovered > 500 ) {
                 $recovered .= LOCALCOLOR GREEN
                     sprintf "%+d", $delta_recovered;
             } else {
@@ -299,16 +299,13 @@ foreach my $i ( 0 ... scalar @$statewise - 1 ) {
             }
 
             my $delta_deaths = $statewise->[$i]{deltadeaths};
-            if ( $delta_deaths > 100 ) {
-                $state = LOCALCOLOR BLACK ON_RED $state;
-                $deaths .= LOCALCOLOR BLACK ON_RED
+            if ( $delta_deaths > 200 ) {
+                $deaths .= LOCALCOLOR BOLD RED
                     sprintf "%+d", $delta_deaths;
             } elsif ( $delta_deaths > 50 ) {
-                $state = LOCALCOLOR BRIGHT_RED $state;
                 $deaths .= LOCALCOLOR BRIGHT_RED
                     sprintf "%+d", $delta_deaths;
             } elsif ( $delta_deaths > 25 ) {
-                $state = LOCALCOLOR RED $state;
                 $deaths .= LOCALCOLOR RED
                     sprintf "%+d", $delta_deaths;
             } else {