in reply to Re: Color on TrueWhite in Curses - Redux
in thread Color on TrueWhite in Curses - Redux
can_change_color() tells you whether the terminal can change its color setup. There is a different function called has_colors() that tells you whether the terminal can display colors at all.
I can produce colors on my terminal with the Curses module just fine. I can double the number of available foreground colors by using "BOLD". And I can establish a library of up to 64 color pairs (foreground/background) to refer to as I wish.
What "can_change_color() == 0" tells me is that I cannot use the init_color(...) function to build a custom color beyond the eight that are initially available.
I can get multiple foreground colors on any of eight predetermined background colors on the same screen. But I cannot achieve two foreground colors on true white on the same screen.
Regarding "I suppose there are still uses..." There are indeed. I am building a new UI for a server admin tool that has out-grown its command line interface. Since this tool will only be used via SSH, I am implementing this as a character-based full-window design. The kind of interactive responsiveness we desire makes a CGI solution impractical.
------------------------------------------------------------
"Perl is a mess
and that's good because the
problem space is also a mess." - Larry Wall
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Color on TrueWhite in Curses - Redux
by steves (Curate) on Feb 04, 2003 at 20:53 UTC | |
by dvergin (Monsignor) on Feb 04, 2003 at 22:15 UTC | |
by steves (Curate) on Feb 04, 2003 at 23:15 UTC |