3

I am running the following:

  • Ubuntu 18.04
  • Gnome Terminal
  • Tmux 2.6
  • Vim 8.0.1453

When running the following snippet,

awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
    r = 255-(colnum*255/76);
    g = (colnum*510/76);
    b = (colnum*255/76);
    if (g>255) g = 510-g;
    printf "\033[48;2;%d;%d;%dm", r,g,b;
    printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
    printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'

I get a continuous color band when outside of Tmux, as opposed to when I run it inside Tmux.

.tmux.conf

set -g default-terminal "screen-256color"
set -sa terminal-overrides ",xterm*:Tc"

I also tried setting the second option to

  • set -as terminal-overrides ",xterm-256color*:RGB"
  • set -as terminal-overrides ",xterm-256color*:Tc"
  • set -ga terminal-overrides ",xterm-256color*:RGB"
  • set -ga terminal-overrides ",xterm-256color*:Tc"
  • set -as terminal-overrides ",*256*:Tc"

... and many more. I also tried removing the first setting altogether.

On a similar note, when running Vim inside Tmux with set termguicolors in .vimrc, I lose all colors.

The bottom line is that I cannot achieve what is referred to as "true color" in Tmux.

I am aware that there are many similar questions, but none offered a solution so far.

0

What does running tmux show -s terminal-overrides and tmux info|grep Tc inside tmux actually show? Are you sure you restarted tmux entirely after changing .tmux.conf?

RGB was not added until tmux 2.7, so you will need to use Tc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.