wire / terminal-osc /
104
OSC 104 — Reset color palette entry
OSC 104 ; c ST resets palette color number c back to its built-in default. With no parameter (OSC 104 ST), it resets the ENTIRE palette to defaults. The inverse of OSC 4 (which sets palette colors).
terminal-osc kind control-sequence status de-facto verification verified tier B terminal-escape@1
aka: reset color palette · reset ANSI colors · OSC 104 · ESC ] 104
frame
OSC introducer: \x1b] ESC ] (0x1B 0x5D)
terminator (ST|BEL): ST \x1b\ · BEL \x07
parameters / subcommands
| id | name | bytes (ST) | meaning |
| reset-one | Reset one color | \x1b]104;1\x1b\ | OSC 104 ; c ST resets palette index c (0–255) to its default value (the X resource / built-in default). Multiple indices may be given separated by ';'. |
| reset-all | Reset all colors | \x1b]104\x1b\ | OSC 104 ST with NO parameter resets the entire color palette to defaults at once. |
gotchas
- OSC 104 with NO parameter resets ALL palette colors; with a parameter it resets only the listed index/indices. Be deliberate about which you emit.
- OSC 104 resets indexed palette entries (the OSC 4 colors). The special colors set by OSC 10/11/12 (default fg/bg/cursor) are reset by OSC 110/111/112 respectively — 104 does NOT touch them.
- 'Default' means the terminal's configured/built-in default, not necessarily black-on-white; what a reset restores depends on the terminal's theme/resources.
- Not every terminal that supports OSC 4 supports OSC 104; if reset has no effect, set the colors back explicitly with OSC 4.
provenance
per-fact attribution:
- #summary — https://invisible-island.net/xterm/ctlseqs/ctlseqs.html xterm ctlseqs: Ps = 1 0 4 ; c -> Reset Color Number c. It is reset to the color specified by the corresponding X resource. With no parameter, reset all colors. (The 10x family mirrors the OSC set commands offset by 100.)
agent: curl -H 'accept: application/json' wire.phall.io/terminal-osc/104
or /terminal-osc/104.json