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:13:06 -0700
User-agent: Workspace Webmail 5.6.44

A: You da man.

Ok, It looks like I am needing ncurses 6 - Where , pray tell, may one get that at.

This is a project that FORCES the modern ncurses upon the developer that I am writing.

NO support considered for Wyse 60, vt100, etc. If one does not have 256 color
and UTF terminal, they can forget about it ...

B: YEs, I have ncurses compiled with 256 colours and UTF. IT is a requirement.

Thanks ...

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]