File Coverage

blib/lib/Graphics/ColorNames/VACCC.pm
Criterion Covered Total %
statement 25 25 100.0
branch 4 4 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 33 34 97.0


line stmt bran cond sub pod time code
1             package Graphics::ColorNames::VACCC;
2              
3             # ABSTRACT: VisiBone Anglo-Centric Color Codes
4              
5              
6             require 5.006;
7              
8 1     1   5721 use strict;
  1         7  
  1         28  
9 1     1   5 use warnings;
  1         2  
  1         54  
10              
11             our $VERSION = '1.03';
12              
13             my %RgbColors = ();
14              
15             sub NamesRgbTable() {
16 1     1   593 use integer;
  1         15  
  1         4  
17 2 100   2 0 27507 unless ( keys %RgbColors ) {
18 1         7 while ( my $line = ) {
19 217         331 chomp($line);
20 217 100       358 if ($line) {
21 216         388 my $rgb = hex substr( $line, 0, 6 );
22 216         346 my $short = lc( substr( $line, 8, 3 ) );
23 216         369 $short =~ s/\s+$//;
24 216         397 my $long = lc( substr( $line, 11 ) );
25 216         539 $long =~ s/^\s+//;
26 216         493 $RgbColors{$short} = $rgb;
27 216         464 $RgbColors{$long} = $rgb;
28 216         651 $long =~ s/\s+//g;
29 216         471 $RgbColors{$long} = $rgb;
30 216         387 $long =~ s/\-//g;
31 216         726 $RgbColors{$long} = $rgb;
32             }
33             }
34             }
35 2         279 return \%RgbColors;
36             }
37              
38             1;
39              
40             =pod
41              
42             =encoding UTF-8
43              
44             =head1 NAME
45              
46             Graphics::ColorNames::VACCC - VisiBone Anglo-Centric Color Codes
47              
48             =head1 VERSION
49              
50             version 1.03
51              
52             =head1 SYNOPSIS
53              
54             require Graphics::ColorNames::VACCC;
55              
56             $NameTable = Graphics::ColorNames::VACCC->NamesRgbTable();
57             $RgbColor = $NameTable->{paledullred};
58              
59             =head1 DESCRIPTION
60              
61             This module defines color names and their associated RGB values for
62             the VisiBone Anglo-Centric Color Code. This is intended for use with
63             the L package.
64              
65             =head1 SEE ALSO
66              
67             A description of this color scheme can be found at
68             L.
69              
70             =head1 SOURCE
71              
72             The development version is on github at L
73             and may be cloned from L
74              
75             =head1 BUGS
76              
77             Please report any bugs or feature requests on the bugtracker website
78             L
79              
80             When submitting a bug or request, please include a test-file or a
81             patch to an existing test-file that illustrates the bug or desired
82             feature.
83              
84             =head1 AUTHOR
85              
86             Robert Rothenberg
87              
88             =head1 CONTRIBUTOR
89              
90             =for stopwords Spoon Reloaded
91              
92             Spoon Reloaded
93              
94             =head2 Acknowledgements
95              
96             A while back I had received a request from somebody to implement this
97             as part of the L distribution. The request
98             included source code for the module. I had suggested to this person
99             that they upload a separate module to CPAN, but heard no reply.
100              
101             Afterwards I had lost the original E-mail.
102              
103             This version of the module was implemented separately.
104              
105             =head1 COPYRIGHT AND LICENSE
106              
107             This software is Copyright (c) 2004,2022 by Robert Rothenberg.
108              
109             This is free software, licensed under:
110              
111             The Artistic License 2.0 (GPL Compatible)
112              
113             =cut
114              
115             __DATA__