Re: [dev] [dvtm] Truecolor support
Hi,
> Apparently curses provides:
>
> int init_color(short color, short r, short g, short b);
>
> not quite sure what it does internally.
There is no support for true color in terminfo, so curses cannot
handle it. If your application need it the only way is to print
directly the sequences, and the only way to detect if the terminal
has this capability is to check TERM against a list of terminals
that suppor it.
> 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.
St maintains a vector with the RGB components of the 256 first colors,
and it extracts from them the RGB components when such colors
are used, so the Term data structure only handles RGB components.
If a true color is used then it only pass the RGB component to Term.
If the user change the components of one of the 256 colors then
st doesn't update the cells with this color and the previous color
definition. As far as I know, it is the correct behaviour.
Regards,
Received on Mon Oct 27 2014 - 14:11:49 CET
This archive was generated by hypermail 2.3.0
: Mon Oct 27 2014 - 14:24:03 CET