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

🚀 Change is_truecolor_terminal to also check for RGB capability #1931

Open
Tachi107 opened this issue Dec 28, 2024 · 0 comments · May be fixed by #1932
Open

🚀 Change is_truecolor_terminal to also check for RGB capability #1931

Tachi107 opened this issue Dec 28, 2024 · 0 comments · May be fixed by #1932

Comments

@Tachi107
Copy link

Tachi107 commented Dec 28, 2024

Hi!

Delta currently only checks the COLORTERM environment variable to detect if the terminal supports "true colors".

Starting with ncurses 6.1, a new RGB capability was added which provides a standard and reliable way of detecting direct RGB color support of a terminal emulator (I'm talking about "direct colour in RGB space" as described in ITU-T Recommendation T.416, also known as ISO/IEC 8613-6, which you can freely download from https://www.itu.int/rec/T-REC-T.416-199303-I/en).

This RGB capability is currently exposed by "direct color" terminals like xterm with TERM=xterm-direct and foot with TERM=foot-direct.

Could you please consider checking for that capability, alongside COLORTERM? Thanks!

Tachi107 added a commit to Tachi107/delta that referenced this issue Dec 29, 2024
This allows delta to work properly on Direct Color terminals like
xterm-direct and foot-direct.

This adds a dependency on the "terminfo" crate in order to read the
`RGB` capability. The crate is used by wezterm, among others.

Fixes dandavison#1931
Tachi107 added a commit to Tachi107/delta that referenced this issue Dec 29, 2024
This allows delta to work properly on Direct Color terminals like
xterm-direct and foot-direct.

This adds a dependency on the "terminfo" crate in order to read the
`RGB` capability. The crate is used by wezterm, among others.

Fixes dandavison#1931
Tachi107 added a commit to Tachi107/delta that referenced this issue Dec 29, 2024
This allows delta to work properly on Direct Color terminals like
xterm-direct and foot-direct.

This adds a dependency on the "terminfo" crate in order to read the
`RGB` capability. The crate is used by wezterm, among others.

Fixes dandavison#1931
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

Successfully merging a pull request may close this issue.

1 participant