1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
NAME
Convert::Color::XTerm - indexed colors used by XTerm
SYNOPSIS
Directly:
use Convert::Color::XTerm;
my $red = Convert::Color::XTerm->new( 1 );
Via Convert::Color:
use Convert::Color;
my $cyan = Convert::Color->new( 'xterm:14' );
DESCRIPTION
This subclass of Convert::Color::RGB8 provides lookup of the colors
that xterm uses by default. Note that the module is not intelligent
enough to actually parse the XTerm configuration on a machine, nor to
query a running terminal for its actual colors. It simply implements
the colors that are present as defaults in the XTerm source code.
It implements the complete 256-color model in XTerm. This range
consists of:
* 0-7: The basic VGA colors, dark intensity. 7 is a "dark" white,
i.e. a light grey.
* 8-15: The basic VGA colors, light intensity. 8 represents a "light"
black, i.e. a dark grey.
* 16-231: A 6x6x6 RGB color cube.
Since version 0.06: This can also be specified as rgb(R,G,B) where
each of R, G and B can be 0 to 5, or 0% to 100%.
* 232-255: 24 greyscale ramp.
Since version 0.06: This can also be specified as grey(GREY), where
GREY is 0 to 23, or 0% to 100%.
CONSTRUCTOR
new
$color = Convert::Color::XTerm->new( $index )
Returns a new object to represent the color at that index.
METHODS
index
$index = $color->index
The index of the XTerm color.
SEE ALSO
* Convert::Color - color space conversions
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
|