primer / github-vscode-theme

GitHub's VS Code themes
https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme
MIT License
1.9k stars 195 forks source link

[Terminal] Arguments passed are extremely hard to see (Screenshot) #155

Closed stagefright5 closed 3 years ago

stagefright5 commented 3 years ago

Description

If you increase the brightness, you can see -b arg being passed to aaaa command in both of the below themes

Github Dark Default

image

Github Dark Dimmed

image

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

claudiorodr commented 3 years ago

Experiencing same issue here.

gperdomor commented 3 years ago

Not only arguments, some logs too, at least in Github Light Default

Screen Shot 2021-04-16 at 9 23 34 AM
kytosai commented 3 years ago

Me too, github light default theme

Demo: https://prnt.sc/11ivpqn

zepfietje commented 3 years ago

I've created a separate issue for the GitHub Light Default terminal colors: https://github.com/primer/github-vscode-theme/issues/157.

mxz7 commented 3 years ago

image

seems to just be very little contrast between the background and dark grey terminal color

stagefright5 commented 3 years ago

@simurai I would like this issue to be reopened as the pr that references this as fixed is only for the light theme.

simurai commented 3 years ago

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:

Screen Shot 2021-04-21 at 16 49 12

But I guess it's a customization? I think the only thing I did is make the branch name (master) green.

dominicegginton commented 3 years ago

Explanation

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
Frame 1light Frame 1dark Frame 1dimmed

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
Frame 1light Frame 1dark Frame 1dimmed

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.

Fixes

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:

GitHub Light Default GitHub Dark Default GitHub Dark Dimmed
Frame 1light Frame 1dark Frame 1dimmed

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.

Command / Program Output

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.

simurai commented 3 years ago

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:

  1. I guess we could invert the colors. For example 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?
  2. To solve this problem, it seems the default colors that VS Code uses is some sort of light/dark gray for white/black to make sure it's still somewhat visible in both, light and dark themes. E.g. terminal.ansiWhite uses #555555 for light themes.

I can look into option 2 and we can see if that is an ok compromise.

simurai commented 3 years ago

Here a PR with some updates to white, black and grays: https://github.com/primer/primitives/pull/78

Before After
Screen Shot 2021-04-22 at 19 37 00 Screen Shot 2021-04-22 at 19 37 57
Screen Shot 2021-04-22 at 19 46 50 Screen Shot 2021-04-22 at 19 53 09
Screen Shot 2021-04-22 at 19 55 39 Screen Shot 2021-04-22 at 19 56 01

But yeah, might be better to just keep the default color that automatically switches between light and dark.

simurai commented 3 years ago

This should be improved in version 4.0.4.