wire / terminal-osc / 12

OSC 12 — Set / query text cursor color

OSC 12 ; spec ST sets the text cursor's color; OSC 12 ; ? ST queries it, replied as OSC 12 ; rgb:RRRR/GGGG/BBBB ST. This colors the cursor block/bar itself, independent of the default foreground (OSC 10) and background (OSC 11).

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

aka: set cursor color · query cursor color · OSC 12 · ESC ] 12

frame

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

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

parameters / subcommands

idnamebytes (ST)meaning
set Set cursor color \x1b]12;#ff0000\x1b\ OSC 12 ; spec ST sets the text cursor color (X11 name or rgb:/# form).
query Query cursor color \x1b]12;?\x1b\ OSC 12 ; ? ST asks for the cursor color; reply OSC 12 ; rgb:RRRR/GGGG/BBBB ST.

gotchas


provenance

per-fact attribution:

see also

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