Statusline truecolor quantization regression in tmux (v2.1.77)
Description
The statusline's truecolor (24-bit RGB) rendering is more heavily quantized in v2.1.77 compared to v2.1.76 when running inside tmux. Colors appear as distinct bands/blocks instead of smooth gradients.
This likely regressed from the v2.1.77 change: "Fixed background colors rendering as terminal-default inside tmux with default configuration"
Steps to reproduce
- Create a statusline script that outputs truecolor gradients using
\033[38;2;R;G;Bmescape sequences (rainbow + grayscale) - Run Claude Code inside tmux
- Observe the statusline renders banded/quantized colors
The same escape sequences render as a smooth gradient when output directly in the tmux pane (via printf), confirming tmux and the terminal both support truecolor correctly. The quantization only occurs in Claude Code's statusline rendering path.
Comparison
v2.1.76 (bottom): Smoother gradient transitions
v2.1.77 (top): More visible banding/stepping in the same gradients
<img width="578" height="477" alt="Image" src="https://github.com/user-attachments/assets/c711f6b8-4074-439c-930d-ba4a7054b290" />
Environment
- Claude Code v2.1.77 (regression) vs v2.1.76 (better)
- tmux 3.6a
- Tested in both Ghostty and iTerm2 — same behavior
- macOS (Darwin 25.2.0, arm64)
COLORTERM=truecolor,TERM=tmux-256color- tmux terminal-features include RGB for outer terminal
Statusline test script
#!/usr/bin/env fish
cat > /dev/null
# Rainbow gradient (40 chars, full hue range)
printf ' '
for i in (seq 0 39)
set h (math "$i * 9")
if test $h -lt 60; set r 255; set g (math "floor($h * 255 / 60)"); set b 0
else if test $h -lt 120; set r (math "floor((120 - $h) * 255 / 60)"); set g 255; set b 0
else if test $h -lt 180; set r 0; set g 255; set b (math "floor(($h - 120) * 255 / 60)")
else if test $h -lt 240; set r 0; set g (math "floor((240 - $h) * 255 / 60)"); set b 255
else if test $h -lt 300; set r (math "floor(($h - 240) * 255 / 60)"); set g 0; set b 255
else; set r 255; set g 0; set b (math "floor((360 - $h) * 255 / 60)")
end
printf '\033[38;2;%d;%d;%dm▇\033[0m' $r $g $b
end
echo ' ← truecolor rainbow'
# Grayscale gradient (40 chars, black→white)
printf ' '
for i in (seq 0 39)
set v (math "floor($i * 255 / 39)")
printf '\033[38;2;%d;%d;%dm▇\033[0m' $v $v $v
end
echo ' ← grayscale gradient'
Expected behavior
Statusline should render the full 24-bit color range as smooth gradients, matching how the same escape sequences render in regular tmux pane output.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗