jesseduffield / jesseduffield/lazygit
Truecolors not working inside tmux
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
This is driving me nuts, I can't really find someone else mention this problem. Inside tmux lazygit colors are looking like this:

What is interesting is that if I enter neovim (in tmux as well) and launch lazygit from its terminal colors are fine:

It works OK if i set `screen-256color` in tmux, but then I can't have italics and underlines in SSH. I am using kitty terminal, but tested with wezterm and alacritty and the result is the same. Also when diffing outside lazygit with delta colors are fine. Here are relevant configs:
`tmux`:
```
set -g default-terminal "tmux-256color"
set -as terminal-features ",${TERM}:RGB"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
```
`delta`:
```
[core]
editor = nvim
pager = delta --features=interactive
[interactive]
diffFilter = delta
[delta]
navigate = true
line-numbers = true
true-color = always
syntax-theme = tokyonight_night
minus-style = "syntax #3b263a"
minus-emph-style = "syntax #5e355c"
zero-style = "syntax auto"
plus-style = "syntax #263949"
plus-emph-style = "syntax #394b70"
line-numbers-minus-style = "#f7768e auto"
line-numbers-zero-style = "#565f89 auto"
line-numbers-left-style = "#565f89 auto"
line-numbers-plus-style = "#41a6b5 auto"
hunk-header-decoration-style = "blue box"
[delta "interactive"]
side-by-side = true
```
`lazygit`:
```
git:
paging:
colorArg: always
pager: delta --dark --paging=never
```
**To Reproduce**
Steps to reproduce the behavior:
1. Start tmux session
2. Launch lazygit
3. Truecolors are not working
**Expected behavior**
Colors should be fine inside tmux
**Screenshots**
Truecolors are working fine inside my terminal:

**Version info:**
`commit=v0.42.0, build date=2024-05-19T10:54:29Z, build source=binaryRelease, version=0.42.0, os=linux, arch=amd64, git version=2.45.2`
Contributor guide
Assessment
This issue has not been assessed yet.