-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
hatch config show terminal colors don't seem compatible with light terminals #1465
Comments
Can you please tell me what happens when you change the background color here? https://github.com/pypa/hatch/blob/hatch-v1.10.0/src/hatch/cli/config/__init__.py#L36 |
Using "white"
produces Using '#ffffff'
produces Using
produces That's readable. Not pretty, but the contrast works, so it's readable. 🙂 |
@willmcgugan What should I do here? I'm not sure what is recommended. |
Syntax will use an Pygments theme by default. Pygments themes use RGB colors , which means that changing the background without changing the text colors is unlikely to look good. You can also use ansi colors, which will render with the user's choice of terminal theme colors. Just set |
I would suggest to keep it simple, because programs like gcc, rustc, ls, rg etc output colorful text without trying to know which background color the terminal has. Pick a syntax coloring with few classes (few different colors or styles) and use ansi colors, I guess? |
I'm just going to remove the explicit background color for broader compatibility even though on light terminals it might not be as pretty like you mentioned. If you require configurability (and can provide example keyword arguments that look good) feel free to open a separate feature request! |
Just as a heads up (mostly for Will) the |
Ok, thanks for that. What do you think about a config option that turns off syntax highlight for this? |
Sure I can do that. |
Syntax colors in the terminal are nice, but the defaults picked don't seem to be easy to read in light background terminals. I've picked the "GNOME light" theme in gnome-terminal here as a standard reference (but I use another light theme, but the problem is the same.)
Configuration: none (I removed the hatch config file for these screenshots.
Version: Hatch, version 1.10.0
The text was updated successfully, but these errors were encountered: