Repository: iqlusioninc/abscissa (language: rust)

Issue:
Usage information is illegible on light backgrounds
Hi -- Not all of us use dark themes, and so I got to see this on startup of a base abscissa app:

<img width="446" alt="Screen Shot 2019-07-25 at 6 23 44 PM" src="https://user-images.githubusercontent.com/37917/61912974-a471d200-af09-11e9-9f6e-6066b43ba495.png">

The white text on the light background is not wonderful :-(

I don't think there's any "magic" color which looks good everywhere, so perhaps just don't use colors at all by default?  In other words, please respect the color choices I've made for my terminal.

Thanks!


Discussion / hints:
You can disable colors in your application by defining the `Application::term_colors` method however you like:

https://docs.rs/abscissa_core/0.2.0/abscissa_core/application/trait.Application.html#method.term_colors

```
    fn term_colors(&self, command: &Self::Cmd) -> ColorChoice {
        ColorChoice::None
    }
```

As for disabling colors by default in the template, I'd rather not. The white is bad but the rest looks fine to me. I can look into some alternative for the white that looks ok on a light background too.

It might also be possible to have color palettes for light and dark backgrounds. It seems like there might also be [some options for detecting the background color](https://gist.github.com/blueyed/c8470c2aad3381c33ea3). It might be interesting to make the color scheme configurable via an `Application` trait method above, and perhaps we could consider a "framework-level" config file (e.g. `~/.config/abscissa.toml`) or environment variables where you could configure settings like default colors / default color palette in such a way that the defaults work across all Abscissa applications.

I'm going to leave this issue open, however I hope you don't mind if I change the title to be a little more general.
Why are neutral colors even used at all in here? Normally, the solution would be to just use the "default" color everywhere you need something legible. Having contrast between elements is good -- however, this is normally done with font weight (i.e., bold, weak) precisely so that one doesn't have to worry about foreground color.
@ErichDonGubler that's something we can experiment with

Fix patch:
diff --git a/core/src/command/usage.rs b/core/src/command/usage.rs
index 29b42bf9..cc684a4b 100644
--- a/core/src/command/usage.rs
+++ b/core/src/command/usage.rs
@@ -100,11 +100,10 @@ impl Usage {
 
         command.print_info()?;
 
-        let mut white = ColorSpec::new();
-        white.set_fg(Some(Color::White));
-        white.set_bold(true);
+        let mut bold = ColorSpec::new();
+        bold.set_bold(true);
 
-        stdout.set_color(&white)?;
+        stdout.set_color(&bold)?;
         writeln!(stdout, "USAGE:")?;
         stdout.reset()?;
 
@@ -121,7 +120,7 @@ impl Usage {
         writeln!(stdout)?;
 
         if let Some(desc) = description {
-            stdout.set_color(&white)?;
+            stdout.set_color(&bold)?;
             writeln!(stdout, "DESCRIPTION:")?;
             stdout.reset()?;
 
@@ -180,11 +179,10 @@ impl Usage {
         command.print_info().unwrap();
 
         if let Some(desc) = description {
-            let mut white = ColorSpec::new();
-            white.set_fg(Some(Color::White));
-            white.set_bold(true);
+            let mut bold = ColorSpec::new();
+            bold.set_bold(true);
 
-            stdout.set_color(&white).unwrap();
+            stdout.set_color(&bold).unwrap();
             writeln!(stdout, "DESCRIPTION:").unwrap();
             stdout.reset().unwrap();
 
@@ -235,9 +233,8 @@ impl Usage {
         writeln!(stdout, "wasn't recognized.")?;
         writeln!(stdout)?;
 
-        let mut white = ColorSpec::new();
-        white.set_fg(Some(Color::White));
-        white.set_bold(true);
+        let mut bold = ColorSpec::new();
+        bold.set_bold(true);
 
         stdout.set_color(&yellow)?;
         writeln!(stdout, "USAGE:")?;
@@ -258,11 +255,10 @@ impl Usage {
         let mut stdout = STDOUT.lock();
         stdout.reset()?;
 
-        let mut white = ColorSpec::new();
-        white.set_fg(Some(Color::White));
-        white.set_bold(true);
+        let mut bold = ColorSpec::new();
+        bold.set_bold(true);
 
-        stdout.set_color(&white)?;
+        stdout.set_color(&bold)?;
         writeln!(stdout, "{} {}", &self.package_name, &self.package_version)?;
         stdout.reset()?;
 
@@ -282,12 +278,11 @@ impl Usage {
     pub fn print_usage(&self) -> Result<(), io::Error> {
         let mut stdout = STDOUT.lock();
 
-        let mut white = ColorSpec::new();
-        white.set_fg(Some(Color::White));
-        white.set_bold(true);
+        let mut bold = ColorSpec::new();
+        bold.set_bold(true);
 
         if !self.args.is_empty() {
-            stdout.set_color(&white)?;
+            stdout.set_color(&bold)?;
             writeln!(stdout, "FLAGS:")?;
             stdout.reset()?;
 
@@ -299,7 +294,7 @@ impl Usage {
         }
 
         if !self.subcommands.is_empty() {
-            stdout.set_color(&white)?;
+            stdout.set_color(&bold)?;
             writeln!(stdout, "SUBCOMMANDS:")?;
             stdout.reset()?;
 


Test patch: