Tmux - true tmux color is not working properly

I am using tmux for now,

I use vim for coding, and I noticed some color flaws, ONLY when I use vim with tmux.

Both terminals support 256 colors when I run this: tput colors

When I test my terminal to see if true true colors are supported, this is the result:

curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash

terminal output: enter image description here

but when I run this in tmux: enter image description here

I checked the result of echo $ TERM, but both of them return this:

xterm-256color

So, I'm really confused about what might be the problem here = \

Any idea?

Thank you so much!

+4
source share
1 answer

, ( , Tc):

commit 427b8204268af5548d09b830e101c59daa095df9
Author: nicm <nicm>
Date:   Fri Jan 29 11:13:56 2016 +0000

    Support for RGB colour, using the extended cell mechanism to avoid
    wasting unnecessary space. The 'Tc' flag must be set in the external
    TERM entry (using terminal-overrides or a custom terminfo entry), if not
    tmux will map to the closest of the 256 or 16 colour palettes.

    Mostly from Suraj N Kurapati, based on a diff originally by someone else.

tmux.conf:

# Enable RGB colour if running in xterm(1)
set-option -sa terminal-overrides ",xterm*:Tc"

man-:

TERMINFO EXTENSIONS
     tmux understands some unofficial extensions to terminfo(5):
...
     Tc      Indicate that the terminal supports the ‘direct colour’ RGB
             escape sequence (for example, \e[38;2;255;255;255m).

             If supported, this is used for the OSC initialize colour escape 
             sequence (which may be enabled by adding the ‘initc’ and ‘ccc’  
             capabilities to the tmux terminfo(5) entry).

-s -g, :

set-option [-agoqsuw] [-t target-session | target-window]                    (: set)
-w ( set-window-option), -s, . -g, . -u , ( -g, ).

-o , -q .

-a, , .

, -s , ( ) , , -g .

:

+2

Source: https://habr.com/ru/post/1667448/


All Articles