Re: [dev] [dvtm] Truecolor support

From: Marc André Tanner <>
Date: Mon, 27 Oct 2014 13:20:33 +0100

On Mon, Oct 27, 2014 at 03:26:44AM +0800, Paride Legovini wrote:
> Hi,
> I see that st nicely support "truecolor" sequences, as it can be
> easily tested with this command:
> printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"
> that has to be given outside any terminal multiplexer. The point is
> that currently no terminal multiplexer (tmux, dvtm, screen) supports
> this kind of color sequences. I'd be interested to see this feature
> added to dvtm, but I'm not sure if it is possible as it may be a
> limitation of libncurses.

Apparently curses provides:

 int init_color(short color, short r, short g, short b);

not quite sure what it does internally.

However the problem is that there can only be COLOR_PAIRS number of
different color pairs in use at any given time. Changing the content
of a pair affects all cells where it is in use. Therefore dvtm currently
maintains a 1 to 1 mapping from foreground + background color to the
associated pair. This works fine if the number of colors is 256 but
not if its 2^24. A more sophisticated mapping would be needed.

I'm currently in the process of cleaning up some dvtm internals. It
would thus be a good time to send patches.

 Marc André Tanner >< >< GPG key: CF7D56C0
Received on Mon Oct 27 2014 - 13:20:33 CET

This archive was generated by hypermail 2.3.0 : Mon Oct 27 2014 - 13:24:08 CET