Hello,
On an ANSI color terminal you may use escapes of the form
"\e[XXm" (\e has ascii code 27 in decimal, 033 in octal) where XX is
the code of the desired effect, as written below :
%attributes = ('clear' => 0,
'reset' => 0,
'bold' => 1,
'underline' => 4,
'underscore' => 4,
'blink' => 5,
'reverse' => 7,
'concealed' => 8,
'black' => 30, 'on_black' => 40,
'red' => 31, 'on_red' => 41,
'green' => 32, 'on_green' => 42,
'yellow' => 33, 'on_yellow' => 43,
'blue' => 34, 'on_blue' => 44,
'magenta' => 35, 'on_magenta' => 45,
'cyan' => 36, 'on_cyan' => 46,
'white' => 37, 'on_white' => 47,
'default' => 39, 'on_default' => 49
);
(this is perl, but the meaning is clear).
FOR ALL SUBSEQUENT PRINTING, UNTIL OTHER ESCAPES ARE PRINTED, THE
SPECIFIED ATTRIBUTE/FOREGROUND/BACKROUND WILL BE ACTIVE.
So don't forget to print a "\e[0m" (reset) where needed. If you like
programming in perl, it allows to easily manipulate these escapes.
Have a good programming,
Etienne