^[control-codes live in libghostty-vt

Operating system commands

OSC 105 Reset Special Color

Put xterm's special colors back as they started.

OSC 105 ; Pc ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
xterm
Operating System Commands

OSC 105 ; Pc ST puts special color Pc back as the terminal started it, undoing OSC 5. Pc is 0 to 4, for bold, underline, blink, reverse and italic, and with none, OSC 105 ST, all five are reset. It is OSC 104 with the numbering moved up by 256, and is read the same way, stopping at the first thing in the list that is not a number (ResetAnsiColorRequest). The same colors can be reset as palette numbers 256 to 260 with OSC 104.

Each special color starts as the default foreground, so in the terminal the cases run in, set up as a default xterm, a reset one is reported as black.

libghostty-vt has no special colors, and ignores OSC 5 and OSC 105, so the cases that ask are known differences.

Validation

OSC105-1: Reset one

\e]5;0;red;1;blue\a  # bold and underline
\e]105;0\a
\e]5;0;?;1;?\a
|____|
reply \e]5;0;rgb:0000/0000/0000\a\e]5;1;rgb:0000/0000/ffff\a

OSC105-2: Reset them all

\e]5;0;red;1;blue\a
\e]105\a
\e]5;0;?;1;?\a
|____|
reply \e]5;0;rgb:0000/0000/0000\a\e]5;1;rgb:0000/0000/0000\a

OSC105-3: Through OSC 104, as color 256

\e]5;0;red\a
\e]104;256\a
\e]5;0;?\a
|____|
reply \e]5;0;rgb:0000/0000/0000\a

OSC105-4: Nothing on screen

A
\e]5;0;red\a
\e]105;0\a
B
|AB__|
cursor 1,3
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.