k9s icon indicating copy to clipboard operation
k9s copied to clipboard

Use `SGR 1` for highlighted text to improve contrast in Microsoft Terminal

Open lindhe opened this issue 3 months ago • 6 comments




Describe the bug

For a long time, I've been struggling with the foreground color in k9s being way too light making it hard to read (especially for the selected/highlighted line) in Microsoft Terminal. After a lot of discussions first in k9s Slack and then in https://github.com/microsoft/terminal/issues/19376 it turns out that the issue is a clash between Microsoft Terminal's default setting for "Intense text style" being "Bright colors" and k9s outputting something else. Here's the useful info from someone that understands the details much better than I do:

I suspect k9s may be using SGR 1 (i.e. bold/bright), so the color in question is bright black. On lhecker's system, SGR 1 is assumedly configured to use a bold font rather than bright colors, which is why the text just looks black, but the font appears to be bold.

https://github.com/microsoft/terminal/issues/19376#issuecomment-3339920853

To Reproduce

  1. Open WSL2 in Microsoft Terminal.
  2. Install k9s: https://k9scli.io/topics/install/
  3. Get yourself a Kubernetes cluster, e.g. via Minikube: https://minikube.sigs.k8s.io/docs/start/
  4. Run k9s

Historical Documents

n/a

Expected behavior

It should look like this:

Image

Screenshots

Image

Versions (please complete the following information):

  • WSL2
  • Ubuntu 22.04
  • k9s v0.50.12

Additional context

n/a

lindhe avatar Sep 30 '25 10:09 lindhe

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 31 '25 02:10 github-actions[bot]

Ping

lindhe avatar Oct 31 '25 10:10 lindhe

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Dec 01 '25 02:12 github-actions[bot]

I'd really appreciate some input on this, it's pretty debilitating for k9s users in Microsoft Terminal…

lindhe avatar Dec 01 '25 08:12 lindhe

@lindhe Agree it could do with a fix, but it's worth posting that there is a full workaround for this as shown in the microsoft terminal issue https://github.com/microsoft/terminal/issues/19376 where this was raised by you with them :-).

And the direct slack link to the k9s discussion is https://k9sers.slack.com/archives/CSHB3MR6G/p1759221799030109?thread_ts=1759150389.600939&cid=CSHB3MR6G

Kolossi avatar Dec 01 '25 09:12 Kolossi

Yeah, I'm aware. It's relatively fine for me now, because I did eventually (after many days of debugging) get it working after getting advice from that thread about the work-around.

I mostly wanted to prevent GitHub bot from closing this issue automatically, since I was not sure if any maintainer had seen my issue. And while the work-around seems to work for me, someone else could have a scenario where they have another important tool that is broken by the work-around. And also I think other people should not have struggle with debugging k9s to find the work-around, it should "just work". 🙂

lindhe avatar Dec 01 '25 09:12 lindhe