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