Query or Change Special Colors (OSC 5)

Query or change a special color based on its index.

  1. 0x1B
    ESC
  2. 0x5D
    ]
  3. 0x35
    5
  4. 0x3B
    ;
  5. ____
    n
  6. 0x3B
    ;
  7. ____
    c
  8. 0x1B
    ESC
  9. 0x5C
    \

Query or change the special color corresponding to n depending on the value of c.

n and c behave nearly identically to OSC 4, and may also be repeated multiple times in one sequence. The difference is that n now ranges between 0 and 4 inclusive, corresponding to the five special colors.