-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
24 bit/True color not working in tmux 2.3 #696
Comments
You need to add Tc with terminal-overrides or a custom terminfo entry.
On 21 Dec 2016 10:26 pm, "Zuhaib" <notifications@github.com> wrote:
Hi,
I am on Mac OSX Siera, and I am struggling to get 24bit color support
inside tmux.
Issue
Colors don't look the same inside tmux. Possibly because I am unable to get
256 colors within tmux.
When I run the following script in terminal and inside tmux I see different
results. The gradient isn't smooth inside tmux.
awk 'BEGIN{ s="/\\/\\/\\/\\/\\"; s=s s s s s s s s s s s s s s s s
s s s s s s s; for (colnum = 0; colnum<256; colnum++) { r =
255-(colnum*255/255); g = (colnum*510/255); b =
(colnum*255/255); 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";}'
*Inside iterm*
[image: screen shot 2016-12-21 at 5 08 36 pm]
<https://cloud.githubusercontent.com/assets/87896/21407965/3bdec642-c7a0-11e6-9f7d-ac8b811c7df8.png>
*inside tmux (iterm > tmux)*
[image: screen shot 2016-12-21 at 5 08 17 pm]
<https://cloud.githubusercontent.com/assets/87896/21407977/53e9c174-c7a0-11e6-9751-4f26ae339b51.png>
*Note:* The gradient isn't smooth.
Environment:
*OS:* OSX Sierra
*Terminal:* iTerm2 build 3.0.*
*Tmux:* Tmux version 2.3
Terminfo
*outside tmux*
⇨ echo $TERM
xterm-256color-italic
Terminfo File: xterm-256color-italic
<https://github.com/nerdpad/dotfiles/blob/master/resources/xterm-256color-italic.terminfo>
*inside tmux*
⇨ echo $TERM
tmux-256color-italic
Terminfo File: tmux-256color-italic
<https://github.com/nerdpad/dotfiles/blob/master/resources/tmux-256color-italic.terminfo>
Tmux.conf
# tmux display things in 256 colorsset -g default-terminal
"tmux-256color-italic"# enable terminal compability
set-option -ga terminal-overrides ",tmux-256color-italic:Tc"
Tc Missing?
When I run tmux info I see that the Tc flag is [missing].
⇨ tmux info | grep Tc
197: Tc: [missing]
**Full tmux info**
```bash ⇨ tmux info Terminal 0: xterm-256color-italic [references=1,
flags=0x1]: 0: AX: [missing] 1: acsc: (string) ``
aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~ 2: bce: (flag) true 3:
bel: (string) \007 4: blink: (string) \033[5m 5: bold: (string) \033[1m 6:
civis: (string) \033[?25l 7: clear: (string) \033[H\033[2J 8: cnorm:
(string) \033[?12l\033[?25h 9: colors: (number) 256 10: Cr: (string)
\033]112\007 11: Cs: (string) \033]12;%p1%s\007 12: csr: (string)
\033[%i%p1%d;%p2%dr 13: cub: (string) \033[%p1%dD 14: cub1: (string) \010
15: cud: (string) \033[%p1%dB 16: cud1: (string) \012 17: cuf: (string)
\033[%p1%dC 18: cuf1: (string) \033[C 19: cup: (string) \033[%i%p1%d;%p2%dH
20: cuu: (string) \033[%p1%dA 21: cuu1: (string) \033[A 22: cvvis: (string)
\033[?12;25h 23: dch: (string) \033[%p1%dP 24: dch1: (string) \033[P 25:
dim: [missing] 26: dl: (string) \033[%p1%dM 27: dl1: (string) \033[M 28:
E3: [missing] 29: ech: (string) \033[%p1%dX 30: el: (string) \033[K 31:
el1: (string) \033[1K 32: enacs: [missing] 33: fsl: (string) \007 34: home:
(string) \033[H 35: hpa: (string) \033[%i%p1%dG 36: ich: (string)
\033[%p1%d@ 37: ich1: [missing] 38: il: (string) \033[%p1%dL 39: il1:
(string) \033[L 40: invis: (string) \033[8m 41: is1: [missing] 42: is2:
(string) \033[!p\033[?3;4l\033[4l\033> 43: is3: [missing] 44: kcbt:
(string) \033[Z 45: kcub1: (string) \033OD 46: kcud1: (string) \033OB 47:
kcuf1: (string) \033OC 48: kcuu1: (string) \033OA 49: kDC: (string)
\033[3;2~ 50: kDC3: [missing] 51: kDC4: [missing] 52: kDC5: [missing] 53:
kDC6: [missing] 54: kDC7: [missing] 55: kdch1: (string) \033[3~ 56: kDN:
[missing] 57: kDN3: [missing] 58: kDN4: [missing] 59: kDN5: [missing] 60:
kDN6: [missing] 61: kDN7: [missing] 62: kend: (string) \033OF 63: kEND:
(string) \033[1;2F 64: kEND3: [missing] 65: kEND4: [missing] 66: kEND5:
[missing] 67: kEND6: [missing] 68: kEND7: [missing] 69: kf1: (string)
\033OP 70: kf10: (string) \033[21~ 71: kf11: (string) \033[23~ 72: kf12:
(string) \033[24~ 73: kf13: (string) \033[1;2P 74: kf14: (string) \033[1;2Q
75: kf15: (string) \033[1;2R 76: kf16: (string) \033[1;2S 77: kf17:
(string) \033[15;2~ 78: kf18: (string) \033[17;2~ 79: kf19: (string)
\033[18;2~ 80: kf2: (string) \033OQ 81: kf20: (string) \033[19;2~ 82: kf21:
(string) \033[20;2~ 83: kf22: (string) \033[21;2~ 84: kf23: (string)
\033[23;2~ 85: kf24: (string) \033[24;2~ 86: kf25: (string) \033[1;5P 87:
kf26: (string) \033[1;5Q 88: kf27: (string) \033[1;5R 89: kf28: (string)
\033[1;5S 90: kf29: (string) \033[15;5~ 91: kf3: (string) \033OR 92: kf30:
(string) \033[17;5~ 93: kf31: (string) \033[18;5~ 94: kf32: (string)
\033[19;5~ 95: kf33: (string) \033[20;5~ 96: kf34: (string) \033[21;5~ 97:
kf35: (string) \033[23;5~ 98: kf36: (string) \033[24;5~ 99: kf37: (string)
\033[1;6P 100: kf38: (string) \033[1;6Q 101: kf39: (string) \033[1;6R 102:
kf4: (string) \033OS 103: kf40: (string) \033[1;6S 104: kf41: (string)
\033[15;6~ 105: kf42: (string) \033[17;6~ 106: kf43: (string) \033[18;6~
107: kf44: (string) \033[19;6~ 108: kf45: (string) \033[20;6~ 109: kf46:
(string) \033[21;6~ 110: kf47: (string) \033[23;6~ 111: kf48: (string)
\033[24;6~ 112: kf49: (string) \033[1;3P 113: kf5: (string) \033[15~ 114:
kf50: (string) \033[1;3Q 115: kf51: (string) \033[1;3R 116: kf52: (string)
\033[1;3S 117: kf53: (string) \033[15;3~ 118: kf54: (string) \033[17;3~
119: kf55: (string) \033[18;3~ 120: kf56: (string) \033[19;3~ 121: kf57:
(string) \033[20;3~ 122: kf58: (string) \033[21;3~ 123: kf59: (string)
\033[23;3~ 124: kf6: (string) \033[17~ 125: kf60: (string) \033[24;3~ 126:
kf61: (string) \033[1;4P 127: kf62: (string) \033[1;4Q 128: kf63: (string)
\033[1;4R 129: kf7: (string) \033[18~ 130: kf8: (string) \033[19~ 131: kf9:
(string) \033[20~ 132: kHOM: (string) \033[1;2H 133: kHOM3: [missing] 134:
kHOM4: [missing] 135: kHOM5: [missing] 136: kHOM6: [missing] 137: kHOM7:
[missing] 138: khome: (string) \033OH 139: kIC: (string) \033[2;2~ 140:
kIC3: [missing] 141: kIC4: [missing] 142: kIC5: [missing] 143: kIC6:
[missing] 144: kIC7: [missing] 145: kich1: (string) \033[2~ 146: kLFT:
(string) \033[1;2D 147: kLFT3: [missing] 148: kLFT4: [missing] 149: kLFT5:
[missing] 150: kLFT6: [missing] 151: kLFT7: [missing] 152: kmous: (string)
\033[M 153: knp: (string) \033[6~ 154: kNXT: (string) \033[6;2~ 155: kNXT3:
[missing] 156: kNXT4: [missing] 157: kNXT5: [missing] 158: kNXT6: [missing]
159: kNXT7: [missing] 160: kpp: (string) \033[5~ 161: kPRV: (string)
\033[5;2~ 162: kPRV3: [missing] 163: kPRV4: [missing] 164: kPRV5: [missing]
165: kPRV6: [missing] 166: kPRV7: [missing] 167: kRIT: (string) \033[1;2C
168: kRIT3: [missing] 169: kRIT4: [missing] 170: kRIT5: [missing] 171:
kRIT6: [missing] 172: kRIT7: [missing] 173: kUP: [missing] 174: kUP3:
[missing] 175: kUP4: [missing] 176: kUP5: [missing] 177: kUP6: [missing]
178: kUP7: [missing] 179: Ms: (string) \033]52;%p1%s;%p2%s\007 180: op:
(string) \033[39;49m 181: rev: (string) \033[7m 182: ri: (string) \033M
183: rmacs: (string) \033(B 184: rmcup: (string) \033[?1049l 185: rmkx:
(string) \033[?1l\033> 186: Se: (string) \033[2 q 187: setab: (string)
\033[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m 188:
setaf: (string)
\033[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m
189: sgr0: (string) \033(B\033[m 190: sitm: (string) \033[3m 191: smacs:
(string) \033(0 192: smcup: (string) \033[?1049h 193: smkx: (string)
\033[?1h\033= 194: smso: (string) \033[7m 195: smul: (string) \033[4m 196:
Ss: (string) \033[%p1%d q 197: Tc: [missing] 198: tsl: (string) \033]0;
199: vpa: (string) \033[%i%p1%dd 200: xenl: (flag) true 201: XT: (flag)
true ```
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#696>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASkc8S9w3R1N7wWcXfKnLIJ8Wq1ETP0ks5rKaePgaJpZM4LTcQt>
.
|
@nicm I have added Isn't this how Tc is supposed to be enabled?
|
terminal-overrides applies to the TERM outside tmux not inside.
…On 21 Dec 2016 10:33 pm, "Zuhaib" ***@***.***> wrote:
@nicm <https://github.com/nicm> I have added Tc in the terminal-overrides
set-option -ga terminal-overrides ",tmux-256color-italic:Tc"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#696 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASkc7Lp1AjwPp-vZ3InbYF_RsmDvpJcks5rKaklgaJpZM4LTcQt>
.
|
Your TERM outside tmux is not tmux it is xterm so that is what you need in
terminal-overrides.
On 21 Dec 2016 10:43 pm, "Zuhaib" <notifications@github.com> wrote:
@nicm <https://github.com/nicm> Pardon me if I am being naive, but I have
added the TC override in my ~/.tmux.conf
It's in my tmux.conf
<https://github.com/nerdpad/dotfiles/blob/master/tmux/tmux.conf.symlink>
set-option -ga terminal-overrides ",tmux-256color-italic:Tc"
Am I missing some step?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#696 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASkcy2Yb-5qy52XGPNB90n4b2N5CQlxks5rKaupgaJpZM4LTcQt>
.
|
@nicm Oh. Thanks that worked. The gradient is now smooth. Thank you for your patience. |
@this worked for me too. Curious: Why does adding |
Did you try removing the comma since you only have one entry? |
@unphased I removed the comma and the "24-bit-color" is still not working in tmux and I still get missing for "Tc" |
You need the comma. Make sure you are restarted tmux entirely after changing .tmux.conf. |
@nicm now the Tc flag is true. |
You are probably using a script that uses :s for separators in the escape sequence, this is not supported. |
I followed the instructions in this GitHub issue to get this working with tmux: tmux/tmux#696.
I followed the instructions in this GitHub issue to get this working with tmux: tmux/tmux#696.
This is EXACTLY what I was looking for. Thanks everyone |
For anyone having trouble with this, you need to ensure that the terminal name in the terminal overrides matches the terminal When you add this override set-option -ga terminal-overrides ",tmux-256color-italic:Tc" to your Run This complete # Use the xterm-256color terminal
set -g default-terminal "xterm-256color"
# Apply Tc
set-option -ga terminal-overrides ",xterm-256color:Tc" |
This is wrong, it needs to be the TERM outside tmux not inside. TERM inside
tmux must be screen* or tmux*. Outside should be different, for most X
terminals it is xterm*.
…On 25 Jan 2018 10:59 pm, "Bill Granfield" ***@***.***> wrote:
For anyone having trouble with this, you need to ensure that the terminal
name in the terminal overrides matches the terminal tmux is actually
using.
When you add this override
set-option -ga terminal-overrides ",tmux-256color-italic:Tc"
to your .tmux.conf, the terminal in the override (in this case
tmux-256color-italic) must match the terminal tmux is actually using or
else the override won't be applied.
If your tmux term is screen or xterm-256color, the override above *will
not work*.
Run echo $TERM in tmux to determine which terminal tmux is currently
using.
You can change the terminal by adding a set -g default-terminal line to
your .tmux.conf.
This complete .tmux.conf tells tmux to use xterm-256color as the terminal
and then enables Tc
# Use the xterm-256color terminalset -g default-terminal "xterm-256color"
# Apply Tc
set-option -ga terminal-overrides ",xterm-256color:Tc"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#696 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASkc2Jjd8G8PDeV_tis8V9tek0Qsj_Qks5tOQdMgaJpZM4LTcQt>
.
|
For anyone struggling with tmux + true color + italic
Nb. |
Another really stupid thing I was doing was having a tmux session hanging around detached from everything else. I kept tweaking my config and restarting my terminal emulator, but I kept getting reattached to the same tmux server/daemon/whatever and couldn't work out why nothing was changing. Make sure there's no tmux processes running. |
Works for me |
The active tmux server must be stopped and restarted after changing these settings. This can be accomplished with the following commands:
Note, this is different than simply quitting and reopening your terminal emulator (i.e. iTerm2, Alacritty). |
alacritty sets $TERM to "alacritty", so no longer matches the wildcard. tmux/tmux#696 (comment)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
I am on Mac OSX Sierra, and I am struggling to get 24bit color support inside tmux.
Issue
Colors don't look the same inside tmux. Possibly because I am unable to get 256 colors within tmux.
When I run the following script in terminal and inside tmux I see different results. The gradient isn't smooth inside tmux.
Inside iterm
inside tmux (iterm > tmux)
Note: The gradient isn't smooth.
Environment:
OS: OSX Sierra
Terminal: iTerm2 build 3.0.*
Tmux: Tmux version 2.3
Terminfo
outside tmux
Terminfo File: xterm-256color-italic
inside tmux
Terminfo File: tmux-256color-italic
Tmux.conf
Tc Missing?
When I run
tmux info
I see that theTc
flag is[missing]
.⇨ tmux info | grep Tc 197: Tc: [missing]
Full tmux info
The text was updated successfully, but these errors were encountered: