Implement full support for OSC 4 and OSC 5
By kra...@skepticism.us on May 10, 2014 02:56 (imported from Google Code)
It would be really helpful if there was a means of asking iTerm2 for the RGB value that it used for a given color index. For example, consider the sequence
\e[48;5;10m
to set the background to color index 10. It would be helpful if there was a means of asking iTerm2 what it mapped that to in the RGB color space. This would make it easy to construct #RGB values for programs like gvim (or any GUI that accepts #RGB syntax).
The rationale is that if I've specified color indexes for my shell (e.g., zsh) and terminal based editor (e.g., vim) I would like to provide equivalent RGB color specifications for my GUI programs (e.g., gvim) so they have a consistent visual appearance.
Note that xterm and rxvt provide an escape sequence for doing this as discussed here: https://bbs.archlinux.org/viewtopic.php?id=151152&p=1
Compatibility with those apps isn't important if doing so would complicate implementation of this request. Especially since there does not appear to be an ANSI or ISO standard for this feature.