Skip to content

Underline color (SGR 58)

Category: sgr · Tags: Kitty Extensions · Specification ↗

SGR 58 sets the underline color independently of the text foreground color. The syntax mirrors SGR 38 (foreground): ESC [ 58:2::R:G:B m for truecolor, ESC [ 58:5:N m for 256-color. Reset the underline color to default with SGR 59. This is particularly useful with curly underlines (SGR 4:3) for diagnostic indicators: red underline for errors, yellow for warnings, blue for hints — all while keeping the text color unchanged. Introduced by Kitty and adopted by other modern terminals.

Supported by 1 of 6 backends (17%)

Support Matrix

BackendVersionSupportNotes
xterm.js5.5.0✓ yes
Alacritty0.26.0~ partialNot exposed via alacritty_terminal API
Ghostty1.3.1~ partialUnderline color not exposed via native Zig API
Kitty0.40.0~ partialNot exposed via Python batch bridge
WezTerm0.1.0-fork.5~ partialNot exposed via wezterm-term API
vt1000.1.0✗ noNot implemented — pure TypeScript emulator

Powered by Termless
Playwright for Terminals