Skip to content

DSR ?996 — color scheme query

Category: device · Baseline: rich · Tags: DEC Private Modes · Specification ↗

DSR ?996 queries the terminal's current color scheme (dark or light). The query is CSI ? 996 n and the response is CSI ? 997 ; Ps n where Ps is 1 for dark and 2 for light. This is Contour's approach to color scheme detection, related to but distinct from Mode 2031 (which uses DECRPM to report and unsolicited DSR to notify of changes). DSR ?996 is a one-shot query that returns the current state, while Mode 2031 enables ongoing notifications when the scheme changes.
How this is testedpartial
Send CSI ? 996 n and verify response matches CSI ? 997 ; Ps n format.

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.

Supported by 0 of 14 backends (0%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9? unknown
Ghostty1.3.1? unknown
VS Code? unknown
Kitty0.46.2? unknown
Warp? unknown
Cursor? unknown
Terminal.app? unknown

Headless Backends

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

BackendVersionSupportNotes
Alacritty0.26.0? unknown
vt100.js0.2.1? unknown
vterm0.2.0? unknown
WezTerm0.1.0-fork.5? unknown
xterm.js5.5.0? unknown