|
Packit |
e6c7a3 |
This Perl module is a simple and convenient interface to the ANSI terminal
|
|
Packit |
e6c7a3 |
escape sequences for color (from ECMA-48, also included in ISO 6429). The
|
|
Packit |
e6c7a3 |
color sequences are provided in two forms, either as constants for each
|
|
Packit |
e6c7a3 |
color or via a function that takes the names of colors and returns the
|
|
Packit |
e6c7a3 |
appropriate escape codes or wraps them around the provided text. The
|
|
Packit |
e6c7a3 |
non-color text style codes from ANSI X3.64 (bold, dark, underline, and
|
|
Packit |
e6c7a3 |
reverse, for example), which were also included in ECMA-48 and ISO 6429,
|
|
Packit |
e6c7a3 |
are also supported. Also supported are the extended colors used for
|
|
Packit |
e6c7a3 |
sixteen-color and 256-color emulators.
|
|
Packit |
e6c7a3 |
|
|
Packit |
e6c7a3 |
This module is very stable, and I've used it in a wide variety of
|
|
Packit |
e6c7a3 |
applications. It has been included in the core Perl distribution starting
|
|
Packit |
e6c7a3 |
with version 5.6.0, so you don't need to download and install it yourself
|
|
Packit |
e6c7a3 |
unless you have an old version of Perl or need a newer version of the
|
|
Packit |
e6c7a3 |
module than comes with your version of Perl. I continue to maintain it as
|
|
Packit |
e6c7a3 |
a separate module, and the version included in Perl is resynced with mine
|
|
Packit |
e6c7a3 |
before each release.
|
|
Packit |
e6c7a3 |
|
|
Packit |
e6c7a3 |
The original module came out of a discussion in comp.lang.perl.misc and is
|
|
Packit |
e6c7a3 |
a combination of two approaches, one with constants by Zenin and one with
|
|
Packit |
e6c7a3 |
functions that I wrote. I offered to maintain a combined module that
|
|
Packit |
e6c7a3 |
included both approaches.
|