Re: [dev] Truecolor ST

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Wed, 17 Jul 2013 21:34:13 +0200

On Wed, Jul 17, 2013 at 08:44:28PM +0200, pancake wrote:
> I've been doing some ansi tests and found that only xterm (not urxvt, vte, iterm2,cmd.exe) supports truecolor ansi escape codes.
>
> It is documented in wikipedia, but afaik, only radare2 uses it (when enabled).
>
> Do you think that it should be implemented in st or we should stand supporting the most common scenarios?
>
> True RGB (24bit color) is constructed like this:
>
> \x1b[38;5;R;G;Bm
>
> Where 38 is fg (48 is bg)
> And RGB are decimal (1-3chars) from 0-255

Could you explain where did you find this information?, because
I only can see:

\x1b[38;5;color;m

where color is an index between 0 and 255. This is the function
implementeb by st:



case 38:
        if(i + 2 < l && attr[i + 1] == 5) {
                i += 2;
                if(BETWEEN(attr[i], 0, 255)) {
                        term.c.attr.fg = attr[i];
                } else {
                        fprintf(stderr,
                                "erresc: bad fgcolor %d\n",
                                attr[i]);
                }
        } else {
                fprintf(stderr,
                        "erresc(38): gfx attr %d unknown\n",
                        attr[i]);
        }
        break;



Best regards,


-- 
Roberto E. Vargas Caballero
----------------------------
k0ga_AT_shike2.com
http://www.shike2.com
Received on Wed Jul 17 2013 - 21:34:13 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 17 2013 - 21:36:14 CEST