Appearance
Underline color, truecolor (SGR 58;2)
CSI 58 ; 2 ; R ; G ; B mSGR 58;2;R;G;B sets the underline color to a 24-bit truecolor value, mirroring the SGR 38;2 syntax used for foreground color. The sequence is
ESC [ 58 ; 2 ; R ; G ; B m, where R, G, and B are 0-255. The ECMA-48 colon-separated form ESC [ 58 : 2 : : R : G : B m (with an empty colorspace ID slot) is also accepted by terminals that follow the strict spec.
Truecolor underlines were originally introduced by Kitty and have since been adopted by every major modern terminal: WezTerm, foot, Ghostty, Alacritty, VTE (GNOME Terminal, Tilix), iTerm2, mintty, Konsole, and Windows Terminal. The underline color is independent of the text foreground color, so applications can render red squiggly underlines for errors and yellow squigglies for warnings while keeping the surrounding text in its normal color.
Reset the underline color to default (typically matching the foreground) with SGR 59.How this is testedautomated
Send
Send
\x1b[4m\x1b[58;2;255;0;128mX, verify the cell at (0,0) has underline active. If the backend tracks underline color per cell, also verify underlineColor matches RGB(255, 0, 128).The same probe runs against headless backends (via Termless) and real terminal apps (via a daemon launched in each terminal). This lets us distinguish parser correctness from rendering correctness.
Analysis2026-04-06
Supported by 8 of 14 backends (57%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | |
| Ghostty | 1.3.1 | ✓ yes | |
| Terminal.app | 2.15 | ✓ yes | |
| Kitty | 0.46.2 | ✓ yes | Underline color not exposed via Python batch bridge |
| VS Code | 1.113.0 | ? unknown | |
| Warp | 0.2026.03.18.08.24.03 | ? unknown | |
| Cursor | 2.6.21 | ? unknown |
Headless Backends
Parser correctness only — a ✓ means the parser accepts the sequence.
| Backend | Version | Support | Notes |
|---|---|---|---|
| vterm | 0.2.0 | ✓ yes | |
| xterm.js | 5.5.0 | ✓ yes | |
| Alacritty | 0.26.0 | ~ partial | Headless alacritty backend doesn't expose underlineColor on cells |
| WezTerm | 0.1.0-fork.5 | ~ partial | Headless wezterm backend doesn't expose underlineColor on cells |
| vt100.js | 0.2.1 | ✗ no | Colored underline (SGR 58) post-dates VT220 — not implemented in vt100.js baseline |