Closed stagefright5 closed 3 years ago
Experiencing same issue here.
Not only arguments, some logs too, at least in Github Light Default
Me too, github light default
theme
Demo: https://prnt.sc/11ivpqn
I've created a separate issue for the GitHub Light Default terminal colors: https://github.com/primer/github-vscode-theme/issues/157.
seems to just be very little contrast between the background and dark grey terminal color
@simurai I would like this issue to be reopened as the pr that references this as fixed is only for the light theme.
I would like this issue to be reopened as the pr that references this as fixed is only for the light theme.
Sure. 👍 Is there a way to reproduce the problem? In my case typing aaaa -b
seems to work fine:
But I guess it's a customization? I think the only thing I did is make the branch name (master
) green.
I think shell configs are the problem here. If black or white colors are set within the prompt they will cause low contrast in dark and light themes respectively. For example, here I attempt to copy the screenshot above by @tekoh who I believe has a black color set within the prompt. I am using this prompt in ZSH %n:%B%F{black}%2~%f %#
to achieve the results below. The default/foreground color changes based upon the theme as intended, however, the prompts path that has been set to a black color causes low contrast issues in dark themes.
GitHub Light Default | GitHub Dark Default | GitHub Dark Dimmed |
---|---|---|
The same occurs in light themes when setting white text within the prompt. For example, here I use this prompt in ZSH %n:%B%F{white}%2~%f %#
to achieve the results below:
GitHub Light Default | GitHub Dark Default | GitHub Dark Dimmed |
---|---|---|
This also accounts for the low contrast -b
flag. @stagefright5 can you check that you haven't set black as the color of your prompt or forgot to reset the colors at the end of the prompt setting? The command highlighting you have enabled will mask this black color as it overrides commands in red, orange and green colors. Therefore the first time you see this is the flag of the command.
As far as I can tell this seems to be a Shell config problem, therefore there is no one fix and everyone who experiences this will have to investigate their own config and change it accordingly. Here is a possible fix for the example I used above to copy the prompt posted by @tekoh:
%n:%B%F{black}%2~%f %#
➡️ %n:%B%F{blue}%2~%f %#
GitHub Light Default | GitHub Dark Default | GitHub Dark Dimmed |
---|---|---|
My advice is: colors in prompts are ok, just use the default/foreground color when you want a black/white text color. This will change based upon your theme you have set and therefore won't cause low contrast with the background. I hope this helps anyone having these issues. If you need help troubleshooting and fixing let me know.
In regards to logs and commands outputting low contrast text. There is nothing a theme can do if a program outputs using a specified color that then contrasts with the theme's background. Command-line software should follow best practice and use the default/foreground color to avoid this problem but it's not always the case.
My advice is: colors in prompts are ok, just use the default/foreground color when you want a black/white text color.
👍
Tested a bit in https://github.com/primer/github-vscode-theme/issues/161#issuecomment-824115667 and yeah, it seems that color names like black and white don't really work well when the background is unknown and could be either black and white. Two things I can think of:
BLACK
would become "white" when in a dark theme. Or WHITE
would become "black" in a light theme. But not sure, that could have some other negative side effects?terminal.ansiWhite
uses #555555
for light themes.I can look into option 2 and we can see if that is an ok compromise.
Here a PR with some updates to white, black and grays: https://github.com/primer/primitives/pull/78
Before | After |
---|---|
But yeah, might be better to just keep the default color that automatically switches between light and dark.
Description
If you increase the brightness, you can see
-b
arg being passed toaaaa
command in both of the below themesGithub Dark Default
Github Dark Dimmed
Theme Info
Version: 4.0.1
Env Info
Version: 1.56.0-insider (user setup) Commit: 25785b97e533b15ae3b12e48aaf4187416437e62 Date: 2021-04-15T05:14:21.699Z Electron: 11.4.2 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19043