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
In reply to Re: Re: Color on TrueWhite in Curses - Redux
by dvergin
in thread Color on TrueWhite in Curses - Redux
by dvergin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |