1Convert::Color::XTerm(3U)ser Contributed Perl DocumentatiCoonnvert::Color::XTerm(3)
2
3
4

NAME

6       "Convert::Color::XTerm" - indexed colors used by XTerm
7

SYNOPSIS

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

DESCRIPTION

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           Since version 0.06: This can also be specified as "rgb(R,G,B)"
40           where each of R, G and B can be 0 to 5, or "0%" to "100%".
41
42       •   232-255: 24 greyscale ramp.
43
44           Since version 0.06: This can also be specified as grey(GREY), where
45           GREY is 0 to 23, or "0%" to "100%".
46

CONSTRUCTOR

48   new
49          $color = Convert::Color::XTerm->new( $index )
50
51       Returns a new object to represent the color at that index.
52

METHODS

54   index
55          $index = $color->index
56
57       The index of the XTerm color.
58

SEE ALSO

60       •   Convert::Color - color space conversions
61

AUTHOR

63       Paul Evans <leonerd@leonerd.org.uk>
64
65
66
67perl v5.36.0                      2023-01-20          Convert::Color::XTerm(3)
Impressum