Skip to content

Mode 2031 color scheme reporting โ€‹

Category: modes ยท Tags: Xterm ext ยท 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 tested: Check DECRPM for mode 2031. Fallback: query current scheme via DECDSR 997 and check for response.
Analysis2026-03-26

Supported by 2 of 6 terminals (33%). Not supported by: vterm.js, vt100.js, Alacritty, xterm.js. Part of the Modern TUI baseline.

Supported by 1 of 18 backends (6%)

Terminal Applications โ€‹

TerminalVersionSupportNotes
cmuxโœ“ yesDECRPM: mode reset
iTerm23.6.9? unknown
Ghostty1.3.1? unknown
VS Code1.112.0? unknown
Cursor2.6.21? unknown
Warp0.2026.03.18.08.24.03? unknown
Terminal.app2.15? unknown
Kitty0.46.2? unknownMode 2031 not exposed via Python batch bridge

Headless Backends โ€‹

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

BackendVersionSupportNotes
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
vterm0.2.0โœ— noMode 2031 not implemented
xterm.js5.5.0? unknownMode 2031 not implemented in xterm.js
xterm.js6.0.0? unknownMode 2031 not implemented in xterm.js
xterm.js5.4.0? unknownMode 2031 not implemented in xterm.js
xterm.js6.1.0-beta.195? unknownMode 2031 not implemented in xterm.js

Powered by Termless
Playwright for Terminals