Skip to content

Standard fg colors (SGR 30-37) โ€‹

Category: sgr ยท Tags: ECMA-48 Standard ยท Specification โ†—

ESC [ 30โ€“37 m
SGR 30-37 set the foreground text color to one of 8 standard colors: black (30), red (31), green (32), yellow (33), blue (34), magenta (35), cyan (36), white (37). Universally supported. The actual displayed color depends on the terminal's color scheme โ€” "red" in one theme may look very different from "red" in another.
How this is tested: Send \x1b[31mX (red), verify the cell's foreground color has a red channel > 100.
Analysis2026-03-26

Supported by all 8 tested terminals โ€” universal adoption. Part of the Core TUI baseline.

Supported by 11 of 13 backends (85%)

Terminal Applications โ€‹

TerminalVersionSupportNotes
iTerm23.6.9โœ“ yes
Ghostty1.3.1โœ“ yes
VS Code1.112.0โœ“ yes
Warp0.2026.03.18.08.24.03โœ“ yes
Cursor2.6.21โœ“ yes
tmux3.6aโœ“ yes
Kitty0.46.2โœ“ yes
Terminal.app2.15โœ“ yes
GNU Screen5.0.1โœ“ yes

Headless Backends โ€‹

Parser correctness only โ€” a โœ“ means the parser accepts the sequence.

BackendVersionSupportNotes
vt1000.2.1โœ“ yes
vterm0.2.0โœ“ yes
Alacritty0.26.0~ partialBackend returns palette index instead of resolved RGB
WezTerm0.1.0-fork.5~ partialBackend returns palette index instead of resolved RGB

Powered by Termless
Playwright for Terminals