Terminal Guide

Query SGR state

ESC1B P50 $24 q71 m6d ESC1B \5C
xterm

Queries currently active SGR attributes.

The terminal replies with

ESC1b P50 131 $24 r72 030 cmds m6d ESC1b \5c 

Where cmds is a ;3b  separated list of SGR attributes currently set.

xterm ( ✔ )

🛈 The blink attribute is normalized to cmd = 5 even if originally set with alias: blink. 🛈 Direct colors are output like this 333 838 :3a 232 :3a :3a 232 535 535 :3a 232 535 535 :3a 232 535 535 . 🛈 256 colors are output like this 333 838 :3a 535 :3a 131 232 333 . 🛈 Named colors (including bright variants) and their palette colors index equivalent are reported as named colors.