4 ms·
> The idea of taking a screenshot of the terminal and then parsing that to determine the true colour support is definitely novel, A better way to do this is to
by shiomiru 1y ago
> The idea of taking a screenshot of the terminal and then parsing that
to determine the true colour support is definitely novel,
A better way to do this is to send `OSC 1 0 ; ? ST` (query foreground
color), `OSC 1 1 ; ? ST` (background color), then `OSC 4 ; {n} ; ? ST`
where {n} is the nth XTerm color.
See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Operating-System-Commands:OSC-Ps;Pt-ST.E65 https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-O...
- tombh 1y agoOMG really!? That link is blocked for me for some reason. If that OSC code is widely supported it's going to make things sooooo much easier.