Article View: news.software.readers
Article #32698Re: slrn and colors
From: John E. Davis
Date: Thu, 10 Apr 1997 00:00
Date: Thu, 10 Apr 1997 00:00
79 lines
3569 bytes
3569 bytes
On 06 Apr 1997 20:40:02 EDT, Vikas Agnihotri <vikas@insight.att.com>
wrote:
> Why cant I set the background /foreground colors to anything that I want i.e.
>any color that I can otherwise set my xterm to using xterm -bg or -fg?
[...]
>For that matter, why cant I specify any color in the X rgb.txt file for the
>slrn foreground/background colors of any 'object� ?
It does not work that way. The terminal is emulating a color ANSI
terminal and slrn communicates with it by sending escape
sequences. As far as color is concerned, the escape sequences are
of the form:
ESC [ 3 f m
ESC [ 4 b m
where `f' and `b' are integers that specify the foreground and
bounground color, resp. The integers only range from 0 to 7 which
means that only 8 different colors are possible. In particular:
f or b RGB description
------------------------------------
0 000 black
1 100 red
2 010 green
3 110 brown
4 001 blue
5 101 magenta
6 011 cyan
7 111 gray
It might be possible for you to configure your terminal to associate
different colors with these integers. I am sure that this is possible
with rxvt and it is most likely possible with a color xterm.
Two other character attributes can influence the color of a character;
however, I do not believe that they are standard:
Bold attribute (ESC [ 1 m)
Blink attribute (ESC [ 5 m)
If a character is displayed with the bold attribute, the color of the
foreground character may appear brigher. For example, brown (f = 3)
may appear as yellow and gray may appear as white. The high intensity
attribute only affects the foreground color--- not the background
color. Thus by using this attribute, it is possible to get 16
distinct foreground colors on most ANSI terminals (but only 8
background colors).
As far as I know, only rxvt allows high intensity background colors
via the blink attribute. That is, one can get a bright brown (or
yellow) background in rxvt by setting the blink attribute for a
character whose background color is brown. Other terminals may simply
display a flashing character. (The VGA video card can be programmed
to allow the blink attribute to enable high intensity background
colors. For that reason, it should be possible to get such colors on
the Linux console. Unfortunately, this feature does not seem to be
available to programs. slrn under OS/2 and MSDOS reprograms the video
card to allow, e,g., a white background. Under the Linux console,
only light gray appears possible at this time.)
If you run slrn using rxvt, or you have a terminal that enables the
blink attribute used this way, add
set use_blink 1
to your .slrnrc file. If using jed, add
TERM_BLINK_MODE = 1;
to your .jedrc file.
--John
Technical Details
Message-ID:
<slrn5kotg7.ksu.davis@mygir.davis.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn5kggj7.52c.vikas@joshua.insight.att.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn5kotg7.ksu.davis@mygir.davis.net> Subject: Re: slrn and colors Date: Thu, 10 Apr 1997 00:00:00 +0000 From: davis@space.mit.edu (John E. Davis) References: <slrn5kggj7.52c.vikas@joshua.insight.att.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 232010176 Organization: Center for Space Research Newsgroups: news.software.readers