I just wanted Emacs to look nice – Using 24-bit color in terminals
Efforts to get Emacs using full 24‑bit “truecolor” inside terminal emulators expose how much historical complexity still underpins terminal standards, terminfo databases, and environment variables like `TERM` and `COLORTERM`. Commenters trade practical recipes for making colors work reliably through layers like tmux, screen, SSH, and TRAMP, and debate whether it’s worth diving into escape codes versus simply using GUI Emacs or modern terminals with better defaults. The thread also highlights broader frustrations with legacy standards, compatibility quirks across platforms (especially macOS Terminal and Windows), and the trade‑off between tinkering with terminal aesthetics and just using more integrated editors like VS Code.
Terminal color support & configuration
- Many note that 24‑bit/“truecolor” already works in most terminals (Linux, Windows 10+, iTerm2, Kitty, etc.) with simple ANSI escape sequences; often
COLORTERM=truecolorplusemacs -nwis enough. - Several argue you rarely need to touch terminfo now; the article is seen as an impressive deep dive but overkill for typical setups.
- Others report that
COLORTERMis inconsistent, especially throughscreen/tmux, and show shell logic that sets or unsets it based on$TERM. - Some prefer to tune the 16‑color palette in the terminal itself and keep Emacs using symbolic color names, so everything (Emacs,
ls, other apps) looks consistent without relying on 24‑bit.
Terminfo, TERM, and detection pain
- Terminfo is widely described as arcane and fragile; people complain about conservative maintenance and difficulty adding modern capabilities.
- A few terminal authors simply claim to be
xterm/rxvtand “deal with fallout” rather than fight terminfo descriptions. - Others stress the importance of not spewing escape sequences into non‑TTY outputs, advocating
isatty()checks, while some want the opposite default (always color, with explicit flags for machine‑readable output). No consensus emerges.
Terminal vs GUI Emacs
- Many argue the easiest path is to run graphical Emacs, which has first‑class GUI support, real fonts, images, mouse integration, and bypasses terminal limitations entirely.
- Others strongly prefer terminal Emacs for ubiquity, SSH usage, session persistence via
tmux/screen, and identical keybindings locally and remotely. - Some use Emacs as their terminal emulator (shell/term/vterm buffers) instead of a separate terminal app.
Remote editing & TRAMP
- TRAMP is frequently recommended to avoid running Emacs remotely, but multiple commenters report performance issues, hangs, and trouble integrating LSP/eglot or containerized environments.
- Suggested mitigations include SSH control master/persistent connections, shorter timeouts, and using TRAMP paths in eshell/dired; still, several find remote Emacs-in-tmux more reliable.
Themes, 24‑bit value, and skepticism
- Theme authors often target 24‑bit GUIs first; mapping to 256‑color palettes can visibly degrade curated schemes like Solarized.
- Pro‑truecolor users say 256‑color palettes are poorly designed and too limited; skeptics question whether fine‑grained color differences matter in practice and dislike “clown color” terminals, preferring minimal highlighting or even pure black‑and‑white.