bug-ncurses
[Top][All Lists]
Advanced

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

color_content after init_pair with -1


From: Sadrul H Chowdhury
Subject: color_content after init_pair with -1
Date: Sun, 24 Sep 2006 22:18:57 -0400

Hi.

I am doing "init_pair(GNT_COLOR_NORMAL, -1, -1);" if "use_default_colors();" returns OK. Now, when I want to dump the contents of the screen in HTML, I do

/* START */
now = mvwinch(curscr, y, x);
pair_content(PAIR_NUMBER(now & A_COLOR), &fg, &bg);
color_content(fg, &r, &g, &b);
/* END */

Doing "pair_content" rightly sets fg and bg to -1 when (now & A_COLOR) is "GNT_COLOR_NORMAL". But doing "color_content" on -1 fails to get the appropriate RGB values. From the man-page for "color_content", I see that the first parameter is allowed a value between 0 and COLORS. So I am wondering whether there's a way I can get the color-contents for -1.

Regards,
Sadrul

reply via email to

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