~ubuntu-branches/ubuntu/dapper/libgraphics-colornames-perl/dapper

« back to all changes in this revision

Viewing changes to lib/Graphics/ColorNames/Netscape.pm

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2004-10-01 12:49:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041001124942-3qlde82ir9850n0s
Tags: 1.05-1
* New upstream release. 
      - updates to POD
      - correction to Graphics::ColourNames
      - correction to README
      - a filehandle for a rgb.txt file can be specified
      - hooks to support CODE scheme types (as with module
        Graphics::ColorNames::GrayScale 2.00)
      - ColourNames.pm has same version of ColorNames.pm
      - added Graphics::ColourNames alias
      - minor changes to ColorNames.pm
      - corrected typo in REQUIREMENTS (wrong Perl version)
      - uses Module::Load for improved dynamic loading
      - EXISTS works across multiple color schemes
      - bug in FETCH that returned key has been fixed
      - corrected bad link in POD
      - rebuilt distribution with proper META.yml
      - added required rgb.txt for tests to MANIFEST and distro
      * now requires Perl 5.6.0
      - uses IO::File
      - option to parse an rgb.txt file
      - removed TODO from distribution
      - Netscape.pm, HTML.pm and Windows.pm warnings enabled
      - additions and corrections in POD
      - added Build.PL to distribution
      - added hex() and rgb() methods
      - created object-oriented interface
      - additions and corrections in POD

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Graphics::ColorNames::Netscape;
 
2
 
 
3
=head1 NAME
 
4
 
 
5
Graphics::ColorNames::Netscape - Netscape 1.1 Color Names
 
6
 
 
7
=head1 SYNOPSIS
 
8
 
 
9
  require Graphics::ColorNames::Netscape;
 
10
 
 
11
  $NameTable = Graphics::ColorNames::Netscape->NamesRgbTable();
 
12
  $RgbBlack  = $NameTable->{black};
 
13
 
 
14
=head1 DESCRIPTION
 
15
 
 
16
This module defines color names and their associated RGB values associated
 
17
with Netscape 1.1 (I cannot determine whether they were once usable in
 
18
Netscape or were arbitrary names for RGB values-- I<many of these names are
 
19
not recognized by later versions of Netscape>).
 
20
 
 
21
=head2 Inconsistencies
 
22
 
 
23
Note that the colors "gold", "lightblue" and "mediumblue" are the
 
24
same. This is because the reference Netscape page (below) shows those
 
25
RGB values. (As of December 2002, the page is still on-line.)
 
26
 
 
27
=head1 SEE ALSO
 
28
 
 
29
L<Graphics::ColorNames>, L<http://home1.netscape.com/home/bg/colorindex.html>
 
30
 
 
31
=head1 AUTHOR
 
32
 
 
33
Robert Rothenberg <rrwo at cpan.org>
 
34
 
 
35
=head2 Acknowledgements
 
36
 
 
37
<magnus at mbox604.swipnet.se> who pointed out Inconsistencies
 
38
 
 
39
=head1 LICENSE
 
40
 
 
41
Copyright (c) 2001-2004 Robert Rothenberg. All rights reserved.
 
42
This program is free software; you can redistribute it and/or
 
43
modify it under the same terms as Perl itself.
 
44
 
 
45
=cut
 
46
 
 
47
require 5.006;
 
48
 
 
49
use strict;
 
50
use warnings;
 
51
 
 
52
our $VERSION = '1.05';
 
53
 
 
54
# See http://home1.netscape.com/home/bg/colorindex.html
 
55
 
 
56
sub NamesRgbTable() {
 
57
  use integer;
 
58
  return {
 
59
    "white"               =>0xffffff,
 
60
    "red"                 =>0xff0000,
 
61
    "green"               =>0x00ff00,
 
62
    "blue"                =>0x0000ff,
 
63
    "magenta"             =>0xff00ff,
 
64
    "cyan"                =>0x00ffff,
 
65
    "yellow"              =>0xffff00,
 
66
    "black"               =>0x000000,
 
67
    "aquamarine"          =>0x70db93,
 
68
    "baker\'schocolate"   =>0x5c3317,
 
69
    "blueviolet"          =>0x9f5f9f,
 
70
    "brass"               =>0xb5a642,
 
71
    "brightgold"          =>0xd9d919,
 
72
    "brown"               =>0xa62a2a,
 
73
    "bronze"              =>0x8c7853,
 
74
    "bronzeii"            =>0xa67d3d,
 
75
    "cadetblue"           =>0x5f9f9f,
 
76
    "coolcopper"          =>0xd98719,
 
77
    "copper"              =>0xb87333,
 
78
    "coral"               =>0xff7f00,
 
79
    "cornflowerblue"      =>0x42426f,
 
80
    "darkbrown"           =>0x5c4033,
 
81
    "darkgreen"           =>0x2f4f2f,
 
82
    "darkgreencopper"     =>0x4a766e,
 
83
    "darkolivegreen"      =>0x4f4f2f,
 
84
    "darkorchid"          =>0x9932cd,
 
85
    "darkpurple"          =>0x871f78,
 
86
    "darkslateblue"       =>0x241882,
 
87
    "darkslategrey"       =>0x2f4f4f,
 
88
    "darktan"             =>0x97694f,
 
89
    "darkturquoise"       =>0x7093db,
 
90
    "darkwood"            =>0x855e42,
 
91
    "dimgrey"             =>0x545454,
 
92
    "dustyrose"           =>0x856363,
 
93
    "feldspar"            =>0xd19275,
 
94
    "firebrick"           =>0x8e2323,
 
95
    "flesh"               =>0xf5ccb0,
 
96
    "forestgreen"         =>0x238e23,
 
97
    "gold"                =>0xcd7f32,
 
98
    "goldenrod"           =>0xdbdb70,
 
99
    "grey"                =>0x545454,
 
100
    "greencopper"         =>0x856363,
 
101
    "greenyellow"         =>0xd19275,
 
102
    "huntergreen"         =>0x8e2323,
 
103
    "indianred"           =>0xf5ccb0,
 
104
    "khaki"               =>0x238e23,
 
105
    "lightblue"           =>0xcd7f32,
 
106
    "lightgrey"           =>0xdbdb70,
 
107
    "lightsteelblue"      =>0x545454,
 
108
    "lightwood"           =>0x856363,
 
109
    "limegreen"           =>0xd19275,
 
110
    "mandarianorange"     =>0x8e2323,
 
111
    "maroon"              =>0xf5ccb0,
 
112
    "mediumaquamarine"    =>0x238e23,
 
113
    "mediumblue"          =>0xcd7f32,
 
114
    "mediumforestgreen"   =>0xdbdb70,
 
115
    "mediumgoldenrod"     =>0xeaeaae,
 
116
    "mediumorchid"        =>0x9370db,
 
117
    "mediumseagreen"      =>0x426f42,
 
118
    "mediumslateblue"     =>0x7f00ff,
 
119
    "mediumspringgreen"   =>0x7fff00,
 
120
    "mediumturquoise"     =>0x70dbdb,
 
121
    "mediumvioletred"     =>0xdb7093,
 
122
    "mediumwood"          =>0xa68064,
 
123
    "midnightblue"        =>0x2f2f4f,
 
124
    "navyblue"            =>0x23238e,
 
125
    "neonblue"            =>0x4d4dff,
 
126
    "neonpink"            =>0xff6ec7,
 
127
    "newmidnightblue"     =>0x00009c,
 
128
    "newtan"              =>0xebc79e,
 
129
    "oldgold"             =>0xcfb53b,
 
130
    "orange"              =>0xff7f00,
 
131
    "orangered"           =>0xff2400,
 
132
    "orchid"              =>0xdb70db,
 
133
    "palegreen"           =>0x8fbc8f,
 
134
    "pink"                =>0xbc8f8f,
 
135
    "plum"                =>0xeaadea,
 
136
    "quartz"              =>0xd9d9f3,
 
137
    "richblue"            =>0x5959ab,
 
138
    "salmon"              =>0x6f4242,
 
139
    "scarlet"             =>0x8c1717,
 
140
    "seagreen"            =>0x238e68,
 
141
    "semi-sweetchocolate" =>0x6b4226,
 
142
    "sienna"              =>0x8e6b23,
 
143
    "silver"              =>0xe6e8fa,
 
144
    "skyblue"             =>0x3299cc,
 
145
    "slateblue"           =>0x007fff,
 
146
    "spicypink"           =>0xff1cae,
 
147
    "springgreen"         =>0x00ff7f,
 
148
    "steelblue"           =>0x236b8e,
 
149
    "summersky"           =>0x38b0de,
 
150
    "tan"                 =>0xdb9370,
 
151
    "thistle"             =>0xd8bfd8,
 
152
    "turquoise"           =>0xadeaea,
 
153
    "verydarkbrown"       =>0x5c4033,
 
154
    "verylightgrey"       =>0xcdcdcd,
 
155
    "violet"              =>0x4f2f4f,
 
156
    "violetred"           =>0xcc3299,
 
157
    "wheat"               =>0xd8d8bf,
 
158
    "yellowgreen"         =>0x99cc32,
 
159
  };
 
160
}
 
161
 
 
162
1;
 
163
 
 
164
__END__