Skip to content

Reset color palette (OSC 104)

Category: extensions · Baseline: modern · Tags: Operating System Commands (OSC), Xterm Extensions · Specification ↗

ESC ] 104 ; c BEL
OSC 104 resets one or all palette colors to their default values. To reset a specific color: ESC ] 104 ; c BEL where c is the palette index. To reset all 256 colors: ESC ] 104 BEL (no argument). This is the companion to OSC 4 — applications that modify the palette at startup should send OSC 104 on exit to restore the user's original colors. Most terminals that support OSC 4 also support OSC 104.
How this is testedautomated
Modify palette color 0 via OSC 4, then send OSC 104 ; 0 BEL to reset it. Verify the terminal consumes the sequence by checking cursor position remains stable.

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 9 terminals (44%). Not supported by: vterm.js, vt100.js, Alacritty, WezTerm, xterm.js. Part of the Modern TUI baseline.

Supported by 8 of 14 backends (57%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✓ yes
Ghostty1.3.1✓ yes
VS Code✓ yes
Warp✓ yes
Cursor✓ yes
Terminal.app✓ yes

Headless Backends

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

BackendVersionSupportNotes
Alacritty0.26.0✗ noOSC 104 color reset requires a real display — headless backends have no color palette to reset
Kitty0.40.0✗ noOSC 104 color reset requires a real display — headless backends have no color palette to reset
vt100.js0.2.1✗ noNot implemented — pure TypeScript emulator
vterm0.2.0✗ noOSC 104 color reset not implemented in vterm.js
WezTerm0.1.0-fork.5✗ noOSC 104 color reset requires a real display — headless backends have no color palette to reset
xterm.js5.5.0✗ noOSC 104 color reset requires a real display — headless backends have no color palette to reset