Skip to content
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

text color equal to background color #2115

Open
smeijer opened this issue Apr 18, 2019 · 5 comments
Open

text color equal to background color #2115

smeijer opened this issue Apr 18, 2019 · 5 comments
Labels

Comments

@smeijer
Copy link

smeijer commented Apr 18, 2019

Some labels are rendered in the same color as the console background. Making them only readable after selecting the text.

Looking through the issues, I realize that can be because most of my labels don't have a background color.

Console: Cmder (ConEmu) @ Windows 10. The console does support 24bit color mode.

hub --version
git version 2.20.1.windows.1
hub version 2.11.2

From left to right, ConEmu, CMD, Powershell:

image

Repo from: #1980 (comment)

@mislav
Copy link
Owner

mislav commented Apr 18, 2019

Hi thank you for reporting! This is how it should look like (iTerm2 on macOS):

Screen Shot 2019-04-18 at 1 29 35 PM

Out detection of color compatibility in terminals isn't great https://github.com/github/hub/blob/dcdf56167c38eacef96ad5ef88575e7f74f9a6f2/utils/color.go#L113-L132

Do any of these terminals advertise TERM_PROGRAM among environment variables?

@mislav mislav added the bug label Apr 18, 2019
@smeijer
Copy link
Author

smeijer commented May 1, 2019

Sorry, lost track of this issue. None of the terminals have the TERM_PROGRAM env variable. What should it's value be?

Shouldn't the purpose of adding --color be to ignore all kinds of terminal detection and force output in the 24bit color mode?

@smeijer
Copy link
Author

smeijer commented May 1, 2019

Setting it to Apple_Terminal to force the "broken 24 bit mode" add's some color to it. As I understand it, setting it to anything else, would force render in 24bit mode. Correct? If that's the case, 24bit mode doesn't work on Windows. Which is strange, because ConEmu should support it.

set TERM_PROGRAM=Apple_Terminal
hub issue labels --color

image

@smeijer
Copy link
Author

smeijer commented May 2, 2019

Cygwin and thereby ConEmu do expose the TERM env variable. It contains the value cygwin. Cmd and Powershell do not.

@mislav
Copy link
Owner

mislav commented May 2, 2019

Thank you for exploring. Since these programs don't set TERM_PROGRAM, is there something else from the environment that we can detect and opt these shells into the "broken 24 bit mode"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants