wire / terminal-osc / 10

OSC 10 — Set / query default foreground color

OSC 10 ; spec ST sets the terminal's default foreground (text) color; OSC 10 ; ? ST queries it, and the terminal replies OSC 10 ; rgb:RRRR/GGGG/BBBB ST. This is the default text color, distinct from the indexed palette (OSC 4). Multiple OSC 10/11/12 settings can be chained because they consume successive parameters.

terminal-osc kind control-sequence status de-facto verification verified tier B terminal-escape@1

aka: set foreground color · query foreground · OSC 10 · ESC ] 10 · default fg

frame

OSC introducer: \x1b] ESC ] (0x1B 0x5D)

terminator (ST|BEL): ST \x1b\ · BEL \x07

parameters / subcommands

idnamebytes (ST)meaning
set Set default foreground \x1b]10;#ffffff\x1b\ OSC 10 ; spec ST sets the default text (foreground) color, where spec is an X11 color name or rgb:RR/GG/BB / #RRGGBB form.
query Query default foreground \x1b]10;?\x1b\ OSC 10 ; ? ST asks for the current default foreground; the terminal replies OSC 10 ; rgb:RRRR/GGGG/BBBB ST (16-bit-per-channel).

gotchas


provenance

per-fact attribution:

see also

agent: curl -H 'accept: application/json' wire.phall.io/terminal-osc/10 or /terminal-osc/10.json