1Convert::Color::VGA(3pmU)ser Contributed Perl DocumentatiCoonnvert::Color::VGA(3pm)
2
3
4
6 "Convert::Color::VGA" - named lookup for the basic VGA colors
7
9 Directly:
10
11 use Convert::Color::VGA;
12
13 my $red = Convert::Color::VGA->new( 'red' );
14
15 # Can also use index
16 my $black = Convert::Color::VGA->new( 0 );
17
18 Via Convert::Color:
19
20 use Convert::Color;
21
22 my $cyan = Convert::Color->new( 'vga:cyan' );
23
25 This subclass of Convert::Color::RGB provides predefined colors for the
26 8 basic VGA colors. Their names are
27
28 black
29 red
30 green
31 yellow
32 blue
33 magenta
34 cyan
35 white
36
37 They may be looked up either by name, or by numerical index within this
38 list.
39
41 new
42 $color = Convert::Color::VGA->new( $name )
43
44 Returns a new object to represent the named color.
45
46 $color = Convert::Color::VGA->new( $index )
47
48 Returns a new object to represent the color at the given index.
49
51 index
52 $index = $color->index
53
54 The index of the VGA color.
55
56 name
57 $name = $color->name
58
59 The name of the VGA color.
60
62 • Convert::Color - color space conversions
63
65 Paul Evans <leonerd@leonerd.org.uk>
66
67
68
69perl v5.38.0 2023-07-20 Convert::Color::VGA(3pm)