On Sun, Nov 06, 2005 at 03:20:10PM +0100, Daniel Burrows wrote:
> On Sat, Nov 05, 2005 at 02:51:07PM -0500, Jason Lunz <[EMAIL PROTECTED]> was 
> heard to say:
> > in rxvt-unicode, aptitude doesn't use color. I didn't realize how useful
> > the colors were until I tried it without them. :)
> > 
> > TERM=rxvt works as a workaround (see urxvt(7) for lots of useful info).
> 
>   The problem seems to be the code that allows you to set the foreground
> and background colors independently.  Because terminals work by allocating
> "color pairs" (blah), this requires that the number of color pairs be equal
> to the square of the number of colors.  rxvt-unicode has 88 colors and 256
> color pairs, so aptitude's new color system is unable to deal with it.

If the color-pairs value is correct, it should be the limit (rxvt-unicode
probably supports more pairs, but without the extended colors option in
ncurses 5.5, that's moot since the regular ncurses only provides 8 bits
for color pair index).

Even with the extended colors, the first cut of that "only" supports 32767
colors (16-bit sign-extension limits portability of the feature across
implementations of curses).
 
>   A sane solution would be to fall back to only supporting the lower
> sqrt(COLOR_PAIRS) colors; 16 in this case.

Better yet - most applications would only use a sparse subset of the
available pairs.  The application could manage its own palette.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Attachment: pgpK38Cdn7IuN.pgp
Description: PGP signature

Reply via email to