jesseduffield / jesseduffield/lazydocker

selectedLineBgColor always uses bright colours; default theme is illegible in white-on-black terminals

Open
#543 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
52.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The `selectedLineBgColor` setting always seems to use bright colours. While that might work for people using dark text on a light background, it makes most of the options illegible when using dark backgrounds. In particular, there's hardly any difference between `blue` and `cyan`, whereas a dark blue background would be ideal.

The [list of colour attributes](https://github.com/jesseduffield/lazydocker/blob/master/docs/Config.md#color-attributes) doesn't seem to mention any way of selecting dark variants vs bright variants.

Setting `red` is a workaround; it's still pretty low-contrast, though. (Not to mention having a bright red bar always in a corner of the screen is a bit distracting, as I keep thinking something has failed!)

**To Reproduce**
Steps to reproduce the behaviour:
1. Configure your terminal theme to be white text on a black background.
2. Launch lazydocker with an empty config file.
3. Press `x` to open the menu, which has all-white text.
4. Try to read the currently-selected item.

**Expected behaviour**
The currently-selected item is

**Screenshots**
`blue`:

![image](https://github.com/jesseduffield/lazydocker/assets/139183/228c6fb1-0b76-4e23-9b1a-3cef7e0d27c9)

`cyan`:

![image](https://github.com/jesseduffield/lazydocker/assets/139183/f3dced6f-68cd-4748-a00d-3d99cd984cb8)

`red`:

![image](https://github.com/jesseduffield/lazydocker/assets/139183/b1e20466-57cd-4e5f-9095-29afa5b834a0)

**Desktop (please complete the following information):**
- OS: macOS 14.5 (23F79)
- Lazydocker Version v0.23.3
- The last commit id if you built project from sources (run : ```git rev-parse HEAD```) [binary release]

**Additional context**
I guess lazydocker has no way of detecting whether the terminal has a dark or light background, and I don't believe there's an environment variable that's conventionally used to indicate this.

Allowing colour names to be prefixed with `dark` or `bright` to choose a specific variant might be useful. Adding a config option for `selectedLineFgColor` might work, too, as I could just set that to black.

OTOH, I'm using iTerm2 and my `$TERM` is `xterm-256color`, so support for the full range of 256 colours would be ideal :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.