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

Windows Terminal supports truecolor, but colored doesn't detect that #180

Open
spenserblack opened this issue Oct 10, 2024 · 1 comment
Open

Comments

@spenserblack
Copy link
Collaborator

spenserblack commented Oct 10, 2024

See microsoft/terminal#11057

We could either detect if Windows Terminal is running by checking if the WT_SESSION environment variable exists, or we could wait for Windows Terminal to set the COLORTERM variable.

@spenserblack
Copy link
Collaborator Author

BTW, when looking into this, I realized we support truecolor but not 256-color (I actually just recently realized they're 2 different things). See how GitHub's CLI detects support:
https://github.com/cli/cli/blob/e6ff77ce73c201b0ee36d2b802ea45e9e1ad1822/pkg/iostreams/color.go#L36-L50

If it's worth doing, we could rename TrueColor to Rgb, and print the truecolor or 256-color escape sequence depending on support. If so, I can open a new issue.

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

No branches or pull requests

1 participant