-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make colored help output more compatible with an applications overall theme #2963
Comments
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 |
@epage Much nicer looking now. What do you think about my theming idea? No need? Or something you'd want a PR about? I have enough TTY exp to do it for sure. |
Referring to using true color? That makes it independent of the terminal's color scheme but it doesn't make it compatible with the application's theme / branding which is what spawned this. I've also found it can cause more problems with the terminal's theme because you don't know the background color and what provides more contrast. Light/dark detection helps but I'm hesitant for including that. This will best be experimented with on the user's side with #3234. If someone settles on something that is enough of an improvement and universal enough, then we can reconsider. |
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 #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.
The text was updated successfully, but these errors were encountered: