https://gitlab.synchro.net/main/sbbs/-/issues/1141#note_10350
The DECRQSS probe — set an odd RGB value, then read back what the terminal actually stored:
Send ESC[48;2;1;2;3m (background to rgb(1,2,3) — no palette entry matches). Send ESC P $ q m ESC \ (DECRQSS request for current SGR).
Read the reply: ESC P 1 $ r <params> m ESC \.
If the params echo 48;2;1;2;3 (or 48:2::1:2:3), you have real truecolor. If they come back as 48;5;n or nothing color-ish, the terminal quantized to the 256-color palette. Reset with ESC[0m after.
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)