TrueColor (24 bits) support

Marc Lehmann schmorp at
Thu Jul 18 12:13:46 CEST 2013

On Thu, Jul 18, 2013 at 01:04:26PM +0400, Антон Кочков <anton.kochkov at> wrote:
> First of all, ncurses have no support for 16M colors palette. Then,

curses (and ncurses) support up to 1e9 colours - thats quite a bit more
than a measly 16m colours (that's 29.9 bit colour, not quite 30).

It would definitely be more than sufficient for radare2's purposes.

> hardcoding ansi codes is not really a crappy way

First, this is not about ansi codes, this is about the non-ansi codes used
by both urxvt and xterm to change colours.

In any case, you are free to call it whatever you like, but hardcoding a
command sequence when you can ask a standard library for the code in a
portable way easily alls under "crappy coding" in my book.

It's exxactly the kind of thing only crappy apps do. Proper apps use
standard mechanisms that have been proven to work for decades and are
available on every unix system.

Note that the case at hand is much worse: your app hardcodes a command
sequence _and then refuses to use it in a compatible terminal_. If radare2
would use the xterm sequence it would just work. It would still be crappy
coding, but at least, it would work in two terminals and not just one.

> see vim sources as an example.

Vim, of course, does a lot of crappy things, such as not being utf-8
compatible in a utf-8 terminal by default, by expecting high bits to mean
something other than multibyte character...

If vim hardcodes the urxvt command sequence to change colours and then
refuses to use it even though the terminal supports it (and support can
be programmatically queried), then calling that "crappy coding" is rather

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the rxvt-unicode mailing list