1Convert::Color::X11(3)User Contributed Perl DocumentationConvert::Color::X11(3)
2
3
4

NAME

6       "Convert::Color::X11" - named lookup of colors from X11's rgb.txt
7

SYNOPSIS

9       Directly:
10
11          use Convert::Color::X11;
12
13          my $red = Convert::Color::X11->new( 'red' );
14
15       Via Convert::Color:
16
17          use Convert::Color;
18
19          my $cyan = Convert::Color->new( 'x11:cyan' );
20

DESCRIPTION

22       This subclass of Convert::Color::RGB8 provides lookup of color names
23       provided by X11's rgb.txt file.
24

CLASS METHODS

26   colors
27          @colors = Convert::Color::X11->colors
28
29       Returns a list of the defined color names, in the order they were found
30       in the rgb.txt file.
31
32          $num_colors = Convert::Color::X11->colors
33
34       When called in scalar context, this method returns the count of the
35       number of defined colors.
36

CONSTRUCTOR

38   new
39          $color = Convert::Color::X11->new( $name )
40
41       Returns a new object to represent the named color.
42

METHODS

44   name
45          $name = $color->name
46
47       The name of the VGA color.
48

SEE ALSO

50       •   Convert::Color - color space conversions
51

AUTHOR

53       Paul Evans <leonerd@leonerd.org.uk>
54
55
56
57perl v5.36.0                      2022-07-22            Convert::Color::X11(3)
Impressum