Skip to content

Mode 2031 color scheme reporting

Category: modes · Baseline: modern · Tags: Xterm Extensions · Specification ↗

Private mode 2031 enables unsolicited notifications when the terminal's color scheme changes between dark and light. When enabled, the terminal sends CSI ? 997 ; Ps n (DECDSR) whenever the scheme changes, where Ps=1 for dark and Ps=2 for light. Applications can also synchronously query the current scheme via CSI ? 997 n (DECDSR 997). This solves a longstanding problem for TUI applications that need to adapt their color palette to the terminal's dark/light mode. Supported by iTerm2 (3.6.6+), tmux 3.6, Contour, foot, and kitty.
How this is testedautomated
Check DECRPM for mode 2031. Fallback: query current scheme via DECDSR 997 and check for response.

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 4 of 12 terminals (33%). Part of the Modern TUI baseline.

Supported by 5 of 14 backends (36%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✓ yesDECRPM: mode reset
Ghostty1.3.1✓ yesDECRPM: mode reset
VS Code✗ no
Warp✗ no
Cursor✗ no
Terminal.app✗ no

Headless Backends

Parser correctness only — a means the parser accepts the sequence.

BackendVersionSupportNotes
vterm0.2.0✓ yesMode 2031 not implemented
Kitty0.40.0~ partialMode 2031 not exposed via Python batch bridge
WezTerm0.1.0-fork.5~ partialMode 2031 not exposed in headless mode
Alacritty0.26.0✗ noMode 2031 not implemented in alacritty
vt100.js0.2.1✗ noNot implemented — pure TypeScript emulator
xterm.js5.5.0✗ noMode 2031 not implemented in xterm.js