1Convert::Color::XTerm(3U)ser Contributed Perl DocumentatiCoonnvert::Color::XTerm(3)
2
3
4
6 "Convert::Color::XTerm" - indexed colors used by XTerm
7
9 Directly:
10
11 use Convert::Color::XTerm;
12
13 my $red = Convert::Color::XTerm->new( 1 );
14
15 Via Convert::Color:
16
17 use Convert::Color;
18
19 my $cyan = Convert::Color->new( 'xterm:14' );
20
22 This subclass of Convert::Color::RGB8 provides lookup of the colors
23 that xterm uses by default. Note that the module is not intelligent
24 enough to actually parse the XTerm configuration on a machine, nor to
25 query a running terminal for its actual colors. It simply implements
26 the colors that are present as defaults in the XTerm source code.
27
28 It implements the complete 256-color model in XTerm. This range
29 consists of:
30
31 · 0-7: The basic VGA colors, dark intensity. 7 is a "dark" white,
32 i.e. a light grey.
33
34 · 8-15: The basic VGA colors, light intensity. 8 represents a "light"
35 black, i.e. a dark grey.
36
37 · 16-231: A 6x6x6 RGB color cube.
38
39 · 232-255: 24 greyscale ramp.
40
42 $color = Convert::Color::XTerm->new( $index )
43 Returns a new object to represent the color at that index.
44
46 $index = $color->index
47 The index of the XTerm color.
48
50 · Convert::Color - color space conversions
51
53 Paul Evans <leonerd@leonerd.org.uk>
54
55
56
57perl v5.30.1 2020-01-29 Convert::Color::XTerm(3)