11-10-05 11:04 PM
>> ncurses normally provides coding for 16 colors, and can be compiled
>
> I'm probably missing something blindingly obvious here, but I can't
> see how to get 16 colours when there seems to be only these colours
> availabe in my curses.h:
Those numbers are just indexes into the default color palette --
i.e. the palette that ncurses sets up when you call start_color(). If
you define a different palette, using init_color(), then you'll be
using your own indexes instead of (or in addition to) the eight that
are predefined.
Don't forget to call can_change_color() before doing any of this.
Plenty of terminals exist that don't support arbitrary color
assignment. (I presume you're already calling has_colors() before
that.)
If you haven't already, man curs_color.
b
[ Post a follow-up to this message ]
|