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

zti does not show colors by default on ubuntu + bash + putty #37

Closed
1000TurquoisePogs opened this issue Aug 26, 2022 · 6 comments
Closed
Labels
enhancement New feature or request

Comments

@1000TurquoisePogs
Copy link

With env vars like TERM=xterm-256color and/or COLORTERM=truecolor I thought I was in the clear on color support.
Other programs such as bash, ls, emacs... they're working wonderfully with colors by default.
Not so on zti - monochrome by default.

tnz/tnz/_termlib.py

Lines 1457 to 1458 in f9dce5f

if os.getenv("TERM_PROGRAM") == "Apple_Terminal":
colors = 256

This line was suspicious to me - why force colors on an apple terminal?
So I searched some more and found I could force colors too.
End result: you can get colors by setting env var TNZ_COLORS=256, but not sure why it didn't default to it considering system configuration.

@najohnsn
Copy link
Member

Sounds like your terminal does not support true color. You got the right action to take. There is some doc here: https://github.com/IBM/tnz/wiki/Colors

@najohnsn
Copy link
Member

Maybe zti could default to use both 256-color and truecolor just in case truecolor is ignored?

@najohnsn najohnsn added the enhancement New feature or request label Aug 26, 2022
@1000TurquoisePogs
Copy link
Author

I'll check more on the truecolor vs 256. But, is there a context you support where zti really needs more colors? GDDM would allow it, but is GDDM supported? That'd need like, sixel support in the ssh terminal.

@najohnsn
Copy link
Member

najohnsn commented Sep 3, 2022

GDDM is not supported.

The use of true color verses 256 or 8 color modes isn't really about the number of colors. It's about achieving the desired color palette without having to configure the terminal emulator.

It's a shame that, at this day and age, there are popular emulators that don't support true color. But that is why zti supports other color modes.

@1000TurquoisePogs
Copy link
Author

I figured out what happened on my end just now.

I had a perfectly functional version of putty, such that I haven't updated it in years but thought that I did. I just found it was from 2017, and updating it gave me 24 bit color.
Not the first time I've encountered someone with a very old version of putty, since its one of those programs you don't think about much until something stops working.

It's a shame that, at this day and age, there are popular emulators that don't support true color
I think most do, but not from that long ago. So assuming its there could result in others opening the same ticket.

Closing this one for now though since works for me.

P.S. you may want to think more on this one:

The use of true color verses 256 or 8 color modes isn't really about the number of colors. It's about achieving the desired color palette without having to configure the terminal emulator.

I've seen enough people that customize their SSH and TN3270 colors for some reason. Some people for example find 3270 blue to be way too dark blue, so they customize it. Being able to stick to the primary VT colors could be a convenient way to color customize.

@najohnsn
Copy link
Member

najohnsn commented Sep 7, 2022

Thanks for the explanation!

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

No branches or pull requests

2 participants