[back] [prev] [next] [index] [root]
ColorString
Defines a string for use in Print to get colorful output.
Syntax:
s := ColorString(l);
string |
s |
|
list of strings |
l |
|
Description:
This function generates a VT100/ANSI compatibel escape
sequence to change the output color. Regardless of the names
used here, the actual outcome is influenced by the terminal
itself: the terminal may have a visible bell, different
colors. The terminal can ignore certain combinations, refuse to
blink, … .
The l argument contains strings of the following form:
- "f_ color" with \em color one of
black, red, green, brown, blue, magenta, cyan, white.
This defines the foreground color.
- "b_ color" for the background color.
- "bright", "blink", "underscore", "reverse", "blank"
to set additional attributes.
- "bell" to include a terminal-bell.
For example to produce red letters on a blue background, one should
use ColorString("f_red", "b_blue"). Depending on the
termcap entries and (eventually) the .Xresources.
To get yellow, one should use "brown" together with
"bright".
<- back[back] [prev] [next] [index] [root]