New: SEO Blog Writer, a readable, checked blog post for your site every week. Pay once, download straight away.

See it
AI Skill Up
Browse skills

Does your terminal support 24-bit colour? How to check

Truecolor makes terminal tools look as designed; without it, colours snap to the nearest of 256. One command to check, which terminals have it, the tmux fix.

Terminal colours come in three levels: 16 colours, 256 colours, and 24-bit truecolor, which is any of 16 million. Tools with designed colour schemes, including themed status lines, assume truecolor. Without it, every colour is rounded to the nearest of 256, and subtle schemes turn muddy.

The one-line test

printf '\033[38;2;255;100;0mTRUECOLOR\033[0m\n'
echo "$COLORTERM"

If TRUECOLOR prints in a clear orange, you have 24-bit colour. COLORTERM set to truecolor or 24bit is a good sign, though not every terminal sets it.

Terminals that support it

iTerm2, Ghostty, WezTerm, Kitty, Alacritty, Windows Terminal and the VS Code integrated terminal all do. Apple's Terminal.app did not support 24-bit colour for many years, so run the test on your macOS version before relying on it.

Inside tmux

# ~/.tmux.conf, tmux 3.2 or later
set -as terminal-features ",xterm-256color:RGB"
# older tmux
set -ga terminal-overrides ",xterm-256color:Tc"

Then kill the tmux server (tmux kill-server) and start again; reloading the config is not always enough.

Over SSH

Colour support follows your local terminal, but COLORTERM may not be passed to the remote shell. If a remote tool refuses truecolor, set COLORTERM=truecolor in the remote session.

Round glyphs are a separate question from colour; see Nerd Fonts for the terminal. And if the status line is not appearing at all, see status line not showing.

Capsule Status Line needs a 24-bit colour terminal, iTerm2, Ghostty, WezTerm, Kitty or VS Code among them, because the label drawn inside each bar depends on exact colours for the filled and empty parts.

Questions

How do I check whether my terminal supports truecolor?

Print text with a 24-bit colour escape code, such as printf with 38;2;255;100;0, and see whether it appears in that exact orange. Many terminals also set COLORTERM to truecolor or 24bit.

Which terminals support 24-bit colour?

iTerm2, Ghostty, WezTerm, Kitty, Alacritty, Windows Terminal and the VS Code terminal, among others. Apple's Terminal.app lacked it for many years, so test on your version.

Why do colours break inside tmux?

tmux has to be told the outer terminal supports RGB colour. Add a terminal-features or terminal-overrides line to tmux.conf and restart the tmux server.

Or skip the afternoonand drop one in.