Open epage opened 2 years ago
Comment by ctrlcctrlv Tuesday Nov 16, 2021 at 07:53 GMT
If you want to guarantee better default colors regardless of a user's terminal theme, you do have the TrueColor escape codes at your disposal, as supported in modern terminals like Kitty. You can also figure out if you're in a light or dark colored terminal with the XTerm escape \e]11;?\a
, supported in even older terminals.
Issue by epage Friday Oct 29, 2021 at 19:58 GMT Originally opened as https://github.com/clap-rs/clap/issues/2963
Please complete the following tasks
Rust Version
rustc 1.55.0 (c8dfcfe04 2021-09-06)
Clap Version
master
Steps to reproduce the bug with the above code
Run enquirer and compare the program's regular output with its
--help
(after enabling colored help)Actual Behaviour
The colors clash with the application's overall theme
Expected Behaviour
The colors are tastefully align with the rest of the theme
Additional Context
In discussing the concerns raised #2845 (see also https://github.com/clap-rs/clap/discussions/2906), we realized that at least one way to describe / categorize the problem with colored help is how well it meshes with the rest of an applications theme.
One of our aims is to provide a low-effort polished ("modern") experience. A subset of our target users will polish the rest of their app over time, including color support and will run into theme compatibility issues. If we can provide both a polished low-effort experience and increase our theme compatibility, that seems like an overall win for our users.
This could be solved by manual help generation (like today or with #2913) or by providing theming support (#1790) but these increase the friction for a polished experience, making it less likely for them to do so.
If we go with changing the current coloring, it doesn't mean we can't use color it has to be a lot more selective and semantically relevant, like with errors. Other tools at our disposal are dim, bold, underline, and italics.