Re: color names

Alain Bench <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
 On Thursday, July 5, 2007 at 17:48:44 +0200, Joe Koenig wrote:

> Is there a way to query, interactively, whether this [/blink/]
> attribute is set?

    What do you mean?


> * Alain Bench <Alain Bench <[email protected]>> wrote:
>> setup your terminal so /blink/ does bright paper.
> How does that work?

    I don't know for your terminal, but if it has this feature, it could
be explained in the manual. Example for PuTTY there is a config option
"Enable blinking text" (off by default). When on, the following text
flashes. When off, the paper takes a bright color.

| $ printf "\033[5m blink or bright paper \033[m\n"
|  blink or bright paper 

    Of course modern PuTTY supporting 256 colors doesn't require this
trick. But it still works.


> How do I find out whether my terminal is a "16 color terminal"? Is it
> "tput colors"?

    Not quite: "tput colors" prints the number of colors declared in the
terminfo database for the current TERM. That is the number of colors
seen by applications. Obviously this is expected to be the right number.
However if TERM is wrong, or the database broken, it happens to be false
(like in your case).

    To determine how many colors has your terminal, you could use for
example:

| $ printf "\033[94m brightblue ink? 16 colors or more. \033[m\n"
|  brightblue ink? 16 colors or more. 
|
| $ printf "\033[38;5;202m orange ink? 256 colors. \033[m\n"
|  orange ink? 256 colors. 


>| tput: unknown terminal "xterm-256color"

    Very outdated terminfo database, from 1999 or before... What about
xterm-16color (in terminfo since 1998)? Well, better just upgrade.


> I have a "16 bit color Terminal", right?

    No: Xterm has a palette of 256 colors usable at once, where each one
can take any RGB nuance (probably 24 bits?). Just like GIFs. And Slrn's
"white" is a keyword for color #15 of the palette: Maybe bright white
RGB=0xFFFFFF by default, maybe any other custom nuance.


> Is there, or should there be, a difference btw. "xterm-color" and
> "xterm-256color"

    TERM=xterm-color is a bad choice. There is a lot of differences:
More colors, function keys, a <BakTab> key, more attributes (standout,
underline, blink...), color palette customizable by applications, a
whole lot of extended key combinations (shift-control-alt-UpArrow and
such), a working <Home> key... Nearly 130 new or modified capabilities.
TERM=xterm-256color is the entry you want.


Bye!	Alain.
-- 
« Be liberal in what you accept, and conservative in what you send. »
	Jon Postel / Robustness Principle / RFC 1122

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.