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

Wrong colors in ghostty #3049

Open
bomgar opened this issue Jan 2, 2025 · 6 comments
Open

Wrong colors in ghostty #3049

bomgar opened this issue Jan 2, 2025 · 6 comments

Comments

@bomgar
Copy link

bomgar commented Jan 2, 2025




Describe the bug
Wrong colors in ghostty.

I set the background color to #ff0000 and took a screenshot in ghostty and wezterm. Wezterm uses the correct color.

This fixes the problem:

TERM=xterm-256color k9s

The default in ghostty is this: xterm-ghostty
I assume terminfo is not used correctly.

Expected behavior
red is red

Screenshots
wezterm
2025-01-02-111224_grim
ghostty
2025-01-02-111220_grim

Versions (please complete the following information):

  • K9s: 0.32.7
  • ghostty: 1.0.1-dev+0000000

Additional context
Discussion
ghostty-org/ghostty#4377

More about terminfo
https://mitchellh.com/writing/ghostty-devlog-004

lazygit has the same issue
jesseduffield/lazygit#4133

@KevinGimbel
Copy link

This seems to be an issue with ghostty, as it affects the rendering in multiple different apps and works in other terminal emulators. I'd wait to see what the ghostty devs have to say about it.

@kevinastone
Copy link

Re-posting my comment from the Ghostty discussion on this issue:

k9s uses tcell, so this is likely an issue upstream with that and I'd guess would be addressed by: gdamore/tcell#763

ghostty-org/ghostty#4377 (comment)

@bomgar
Copy link
Author

bomgar commented Jan 9, 2025

https://github.com/gdamore/tcell/releases/tag/v2.8.0
This release has the ghostty support.

@slagiewka
Copy link

k9s has been running off a fork for 2 years now. This might get tricky to update without knowing what has originally caused the issue in the lib.

Possibly the broken thing was #1943, but there is no reference to any upstream issue that could be tracked.

@jpaju
Copy link

jpaju commented Jan 9, 2025

I think it's related on reading the TERM environment variable. Ghostty has it set to xterm-ghostty, which is not recognized by some libraries I suppose

@erik-reges
Copy link

i am having the same 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

6 participants