wire / terminal-osc / 21
OSC 21 is sent by the terminal to report color scheme changes: OSC 21 ; dark ST or OSC 21 ; light ST. Applications can query with OSC 21 ; ? ST.
aka: OSC 21 · OSC 21 — Color scheme (dark/light) notification
OSC introducer: \x1b] ESC ] (0x1B 0x5D)
terminator (ST|BEL): ST \x1b\ · BEL \x07
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| dark | Dark mode | \x1b]21;dark\x1b\ | OSC 21 ; dark ST reports dark mode. |
| light | Light mode | \x1b]21;light\x1b\ | OSC 21 ; light ST reports light mode. |
| query | Query scheme | \x1b]21;?\x1b\ | OSC 21 ; ? ST queries the current color scheme. |
agent: curl -H 'accept: application/json' wire.phall.io/terminal-osc/21
or /terminal-osc/21.json