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: David Unterwandling
Subject: Re: Issue using more than 255 color pairs
Date: Sun, 16 Jul 2023 15:10:28 +0200

Thank you for taking the time.

On Sun, Jul 16, 2023 at 04:35:08AM -0400, Thomas Dickey wrote:
> the X/Open interfaces using cchar_t rather than chtype would help

That solved my problem, I use TERM=foot.

-- David

#include <curses.h>
#define BRIGHT 8

int
main(void)
{
    register int i;

    initscr();
    start_color();
    use_default_colors();

    for (i = 1; i < 300; i++)
        init_pair(i, -1, COLOR_RED);

    attr_set(A_NORMAL, 260, NULL); /* that works! even if COLORS=256 */

    if (can_change_color()) /* false, if TERM=foot-direct */
        init_pair(260, COLOR_GREEN|BRIGHT, -1);

    printw("using xterm-direct, bright colors are invisible");

    refresh();
    getch();
    endwin();

    return 0;
}



reply via email to

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