bug-ncurses
[Top][All Lists]
Advanced

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

Re: Issue using more than 255 color pairs


From: Thomas Dickey
Subject: Re: Issue using more than 255 color pairs
Date: Sat, 15 Jul 2023 11:31:58 -0400

On Sat, Jul 15, 2023 at 05:31:59PM +0200, David Unterwandling wrote:
> > correctly. If I use a custom macro instead of COLOR_PAIR it seems to work.
> > So for example
> >
> >     #define MY_A_COLOR NCURSES_BITS(((1U) << 16) - 1U, 0)
> >     #define MY_COLOR_PAIR(n) (NCURSES_BITS((n), 0) & MY_A_COLOR)
> >
> > The change here is MY_A_COLOR uses a 16 bit shift instead of an 8 bit
> 
> 6 years later.. I tried the same. Same result with

I don't see a previous message with either this title or author.
 
>     #define COLOR_PAIR(n) n << 8
> 
> While that make some color pairs accessible, these are just the previously
> initiated color pairs with an immutable A_REVERSE.

perhaps if you provided a complete test-program which demonstrates an
unwanted change, I could investigate that.
 
> I checked that my distributions have built with --enable-widec, and that
> NCURSES_WIDECHAR (or _XOPEN_SOURCE) is set before including curses.h.
> 
> Actually I figured out that the terminal color palette is usually 16 + 2
> inclusive foreground and background.  The application uses bold for bright
> on systems with less than 16 colors, so these color pairs are initiated
> like regular colors.
> 
> --
> David
> 

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

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