bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

COLORS and COLOR_PAIRS


From: Michael D. Adams
Subject: COLORS and COLOR_PAIRS
Date: Sun, 16 Oct 2005 01:20:56 -0500

I discovered a little annoyance while using the Python ncurses binding
so some of this may be due to that binding but I think it is true of
ncurses in general.  If I do not call use_default_colors() then COLORS
is 8 and COLOR_PAIRS is 64.  This is reasonable.  With colors 0 though
7 I can represent at most 64 pairs.  However if I do call
use_default_colors(), COLORS and COLOR_PAIRS are still 8 and 64.  This
introduces a limitation because now I can in theory represent colors
-1 though 7 for 81 pairs, but ncurses limits me to 64.  My particular
app is a text editor so I would like to provide all possible color
combinations to downstream users.  (It is very unlikely that anyone
will need all those colors at once, but I don't want to impose
arbitrary limits.)

Is there a workaround for this?  Can it be fixed in ncurses or is it
an inherit limitation?

Michael D. Adams
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]