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).
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.
#summary — https://invisible-island.net/xterm/ctlseqs/ctlseqs.htmlxterm 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.)