[Feature request] OSC 4, 10/11/12/17 support
OSC 10-17 have the ability to get and set the terminal bg/fg/cursor/highlight color. OSC 4 lets you get and set the actual RGB values of the terminal 256-color palette, including the 16 ANSI colors, and could be used to avoid blindly outputting clashing colors to the screen. I'm writing a little tool to set the terminal colors and I keep having to special-case iTerm2 (by checking $TERM_PROGRAM etc) because it has its own (less complicated) way of setting the colors via escape sequences (but not reporting on the current settings).
Here's the spec for these OSC control sequences: https://github.com/JessThrysoee/xtermcontrol/blob/master/doc/ctlseqs.txt#L745.
Thank you, Katherine Crowson