bug-ncurses
[Top][All Lists]
Advanced

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

RE: Where's My Color ?


From: bend
Subject: RE: Where's My Color ?
Date: Tue, 26 Nov 2013 06:36:00 -0700
User-agent: Workspace Webmail 5.6.44

Acckkk .... Guess I did have it :
ldd reports :

address@hidden pslag]# ldd initcolor
        linux-gate.so.1 =>  (0x00251000)
        libncursesw.so.6 => /usr/local/lib/libncursesw.so.6 (0x00af5000)
        libpanelw.so.6 => /usr/local/lib/libpanelw.so.6 (0x00606000)
        libc.so.6 => /lib/libc.so.6 (0x006ad000)
        /lib/ld-linux.so.2 (0x00687000)

Ok, cool. Now all I have to do is figure out how to use it ...



Ben Duncan - Business Network Solutions, Inc. 336 Elton Road Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
- Hanlon's Razor


-------- Original Message --------
Subject: Re: Where's My Color ?
From: Thomas Dickey <address@hidden>
Date: Mon, November 25, 2013 7:57 pm
To: address@hidden
Cc: address@hidden

On Mon, Nov 25, 2013 at 11:47:51AM -0700, address@hidden wrote:
> <html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>Or better yet ... why no color after pair 256 ?</div><div><br></div><div>Attached is sample program that shows me 256 color and plus some. It sets up the</div><div>color pair. TERM is defined as xterm-256color. All is well for the first 256 color</div><div>pair.</div><div><br></div><div>I set the 257'th (Or 256 base 0) in init_mycolor () and wham. </div><div>the 256'th pair does not come out as defined.</div><div><br></div><div>Is it something I am doing wrong ?<br></div><div><br></div><div><span style="font-size: 8pt;" mce_style="font-size: 8pt;"></span><span style="font-size: 8pt;" mce_style="font-size: 8pt;">Ben Duncan - Business Network Solutions, Inc. 336 Elton Road Jackson MS, 39212<br>"Never attribute to malice, that which can be adequately explained by stupidity"<br>- Hanlon's Razor<br></span></div></span></body></html>
> /* Test Wide Window characters for UTF-8
> * Compile with : gcc -lncursesw -lpanelw -o testwidewin testwidewin.c
> */
...
> for(i=0 ;i<290;i++)
> {
> attron(COLOR_PAIR(i));
> printw("[COLOR %hd]", i);
> }
>
>
> attron(COLOR_PAIR(256));

Two problems:

a) attron passes the color packed in a chtype, which limits it to 4 bits.
b) the "right" interface would be something like wattr_set, but unless
you have compiled ncurses using the extended colors (or perhaps using
the ncurses6 packages that I upload occasionally), you won't get that.

I covered some of that in my faq:

http://invisible-island.net/ncurses/ncurses.faq.html#xterm_256color

--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

reply via email to

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