-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmycolors.pm
204 lines (204 loc) · 9.89 KB
/
mycolors.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
package mycolors;
use Data::Dumper qw(Dumper);
sub findcolor{
my $colkey=shift;
my %COLORS = (
white => [ 0xFF, 0xFF, 0xFF ],
black => [ 0x00, 0x00, 0x00 ],
aliceblue => [ 0xF0, 0xF8, 0xFF ],
antiquewhite => [ 0xFA, 0xEB, 0xD7 ],
aqua => [ 0x00, 0xFF, 0xFF ],
aquamarine => [ 0x7F, 0xFF, 0xD4 ],
azure => [ 0xF0, 0xFF, 0xFF ],
beige => [ 0xF5, 0xF5, 0xDC ],
bisque => [ 0xFF, 0xE4, 0xC4 ],
blanchedalmond => [ 0xFF, 0xEB, 0xCD ],
blue => [ 0x00, 0x00, 0xFF ],
blueviolet => [ 0x8A, 0x2B, 0xE2 ],
brown => [ 0xA5, 0x2A, 0x2A ],
burlywood => [ 0xDE, 0xB8, 0x87 ],
cadetblue => [ 0x5F, 0x9E, 0xA0 ],
chartreuse => [ 0x7F, 0xFF, 0x00 ],
chocolate => [ 0xD2, 0x69, 0x1E ],
coral => [ 0xFF, 0x7F, 0x50 ],
cornflowerblue => [ 0x64, 0x95, 0xED ],
cornsilk => [ 0xFF, 0xF8, 0xDC ],
crimson => [ 0xDC, 0x14, 0x3C ],
cyan => [ 0x00, 0xFF, 0xFF ],
darkblue => [ 0x00, 0x00, 0x8B ],
darkcyan => [ 0x00, 0x8B, 0x8B ],
darkgoldenrod => [ 0xB8, 0x86, 0x0B ],
darkgray => [ 0xA9, 0xA9, 0xA9 ],
darkgreen => [ 0x00, 0x64, 0x00 ],
darkkhaki => [ 0xBD, 0xB7, 0x6B ],
darkmagenta => [ 0x8B, 0x00, 0x8B ],
darkolivegreen => [ 0x55, 0x6B, 0x2F ],
darkorange => [ 0xFF, 0x8C, 0x00 ],
darkorchid => [ 0x99, 0x32, 0xCC ],
darkred => [ 0x8B, 0x00, 0x00 ],
darksalmon => [ 0xE9, 0x96, 0x7A ],
darkseagreen => [ 0x8F, 0xBC, 0x8F ],
darkslateblue => [ 0x48, 0x3D, 0x8B ],
darkslategray => [ 0x2F, 0x4F, 0x4F ],
darkturquoise => [ 0x00, 0xCE, 0xD1 ],
darkviolet => [ 0x94, 0x00, 0xD3 ],
deeppink => [ 0xFF, 0x14, 0x100 ],
deepskyblue => [ 0x00, 0xBF, 0xFF ],
dimgray => [ 0x69, 0x69, 0x69 ],
dodgerblue => [ 0x1E, 0x90, 0xFF ],
firebrick => [ 0xB2, 0x22, 0x22 ],
floralwhite => [ 0xFF, 0xFA, 0xF0 ],
forestgreen => [ 0x22, 0x8B, 0x22 ],
fuchsia => [ 0xFF, 0x00, 0xFF ],
gainsboro => [ 0xDC, 0xDC, 0xDC ],
ghostwhite => [ 0xF8, 0xF8, 0xFF ],
gold => [ 0xFF, 0xD7, 0x00 ],
goldenrod => [ 0xDA, 0xA5, 0x20 ],
gray => [ 0x80, 0x80, 0x80 ],
green => [ 0x00, 0x80, 0x00 ],
greenyellow => [ 0xAD, 0xFF, 0x2F ],
honeydew => [ 0xF0, 0xFF, 0xF0 ],
hotpink => [ 0xFF, 0x69, 0xB4 ],
indianred => [ 0xCD, 0x5C, 0x5C ],
indigo => [ 0x4B, 0x00, 0x82 ],
ivory => [ 0xFF, 0xFF, 0xF0 ],
khaki => [ 0xF0, 0xE6, 0x8C ],
lavender => [ 0xE6, 0xE6, 0xFA ],
lavenderblush => [ 0xFF, 0xF0, 0xF5 ],
lawngreen => [ 0x7C, 0xFC, 0x00 ],
lemonchiffon => [ 0xFF, 0xFA, 0xCD ],
lightblue => [ 0xAD, 0xD8, 0xE6 ],
lightcoral => [ 0xF0, 0x80, 0x80 ],
lightcyan => [ 0xE0, 0xFF, 0xFF ],
lightgoldenrodyellow => [ 0xFA, 0xFA, 0xD2 ],
lightgreen => [ 0x90, 0xEE, 0x90 ],
lightgrey => [ 0xD3, 0xD3, 0xD3 ],
lightpink => [ 0xFF, 0xB6, 0xC1 ],
lightsalmon => [ 0xFF, 0xA0, 0x7A ],
lightseagreen => [ 0x20, 0xB2, 0xAA ],
lightskyblue => [ 0x87, 0xCE, 0xFA ],
lightslategray => [ 0x77, 0x88, 0x99 ],
lightsteelblue => [ 0xB0, 0xC4, 0xDE ],
lightyellow => [ 0xFF, 0xFF, 0xE0 ],
lime => [ 0x00, 0xFF, 0x00 ],
limegreen => [ 0x32, 0xCD, 0x32 ],
linen => [ 0xFA, 0xF0, 0xE6 ],
magenta => [ 0xFF, 0x00, 0xFF ],
maroon => [ 0x80, 0x00, 0x00 ],
mediumaquamarine => [ 0x66, 0xCD, 0xAA ],
mediumblue => [ 0x00, 0x00, 0xCD ],
mediumorchid => [ 0xBA, 0x55, 0xD3 ],
mediumpurple => [ 0x100, 0x70, 0xDB ],
mediumseagreen => [ 0x3C, 0xB3, 0x71 ],
mediumslateblue => [ 0x7B, 0x68, 0xEE ],
mediumspringgreen => [ 0x00, 0xFA, 0x9A ],
mediumturquoise => [ 0x48, 0xD1, 0xCC ],
mediumvioletred => [ 0xC7, 0x15, 0x85 ],
midnightblue => [ 0x19, 0x19, 0x70 ],
mintcream => [ 0xF5, 0xFF, 0xFA ],
mistyrose => [ 0xFF, 0xE4, 0xE1 ],
moccasin => [ 0xFF, 0xE4, 0xB5 ],
navajowhite => [ 0xFF, 0xDE, 0xAD ],
navy => [ 0x00, 0x00, 0x80 ],
oldlace => [ 0xFD, 0xF5, 0xE6 ],
olive => [ 0x80, 0x80, 0x00 ],
olivedrab => [ 0x6B, 0x8E, 0x23 ],
orange => [ 0xFF, 0xA5, 0x00 ],
orangered => [ 0xFF, 0x45, 0x00 ],
orchid => [ 0xDA, 0x70, 0xD6 ],
palegoldenrod => [ 0xEE, 0xE8, 0xAA ],
palegreen => [ 0x98, 0xFB, 0x98 ],
paleturquoise => [ 0xAF, 0xEE, 0xEE ],
palevioletred => [ 0xDB, 0x70, 0x100 ],
papayawhip => [ 0xFF, 0xEF, 0xD5 ],
peachpuff => [ 0xFF, 0xDA, 0xB9 ],
peru => [ 0xCD, 0x85, 0x3F ],
pink => [ 0xFF, 0xC0, 0xCB ],
plum => [ 0xDD, 0xA0, 0xDD ],
powderblue => [ 0xB0, 0xE0, 0xE6 ],
purple => [ 0x80, 0x00, 0x80 ],
red => [ 0xFF, 0x00, 0x00 ],
rosybrown => [ 0xBC, 0x8F, 0x8F ],
royalblue => [ 0x41, 0x69, 0xE1 ],
saddlebrown => [ 0x8B, 0x45, 0x13 ],
salmon => [ 0xFA, 0x80, 0x72 ],
sandybrown => [ 0xF4, 0xA4, 0x60 ],
seagreen => [ 0x2E, 0x8B, 0x57 ],
seashell => [ 0xFF, 0xF5, 0xEE ],
sienna => [ 0xA0, 0x52, 0x2D ],
silver => [ 0xC0, 0xC0, 0xC0 ],
skyblue => [ 0x87, 0xCE, 0xEB ],
slateblue => [ 0x6A, 0x5A, 0xCD ],
slategray => [ 0x70, 0x80, 0x90 ],
snow => [ 0xFF, 0xFA, 0xFA ],
springgreen => [ 0x00, 0xFF, 0x7F ],
steelblue => [ 0x46, 0x82, 0xB4 ],
tan => [ 0xD2, 0xB4, 0x8C ],
teal => [ 0x00, 0x80, 0x80 ],
thistle => [ 0xD8, 0xBF, 0xD8 ],
tomato => [ 0xFF, 0x63, 0x47 ],
turquoise => [ 0x40, 0xE0, 0xD0 ],
violet => [ 0xEE, 0x82, 0xEE ],
wheat => [ 0xF5, 0xDE, 0xB3 ],
whitesmoke => [ 0xF5, 0xF5, 0xF5 ],
yellow => [ 0xFF, 0xFF, 0x00 ],
yellowgreen => [ 0x9A, 0xCD, 0x32 ],
gradient1 => [ 0x00, 0xFF, 0x00 ],
gradient2 => [ 0x0A, 0xFF, 0x00 ],
gradient3 => [ 0x14, 0xFF, 0x00 ],
gradient4 => [ 0x1E, 0xFF, 0x00 ],
gradient5 => [ 0x28, 0xFF, 0x00 ],
gradient6 => [ 0x32, 0xFF, 0x00 ],
gradient7 => [ 0x3D, 0xFF, 0x00 ],
gradient8 => [ 0x47, 0xFF, 0x00 ],
gradient9 => [ 0x51, 0xFF, 0x00 ],
gradient10 => [ 0x5B, 0xFF, 0x00 ],
gradient11 => [ 0x65, 0xFF, 0x00 ],
gradient12 => [ 0x70, 0xFF, 0x00 ],
gradient13 => [ 0x7A, 0xFF, 0x00 ],
gradient14 => [ 0x84, 0xFF, 0x00 ],
gradient15 => [ 0x8E, 0xFF, 0x00 ],
gradient16 => [ 0x99, 0xFF, 0x00 ],
gradient17 => [ 0xA3, 0xFF, 0x00 ],
gradient18 => [ 0xAD, 0xFF, 0x00 ],
gradient19 => [ 0xB7, 0xFF, 0x00 ],
gradient20 => [ 0xC1, 0xFF, 0x00 ],
gradient21 => [ 0xCC, 0xFF, 0x00 ],
gradient22 => [ 0xD6, 0xFF, 0x00 ],
gradient23 => [ 0xE0, 0xFF, 0x00 ],
gradient24 => [ 0xEA, 0xFF, 0x00 ],
gradient25 => [ 0xF4, 0xFF, 0x00 ],
gradient26 => [ 0xFF, 0xFF, 0x00 ],
gradient27 => [ 0xFF, 0xF4, 0x00 ],
gradient28 => [ 0xFF, 0xEA, 0x00 ],
gradient29 => [ 0xFF, 0xE0, 0x00 ],
gradient30 => [ 0xFF, 0xD6, 0x00 ],
gradient31 => [ 0xFF, 0xCC, 0x00 ],
gradient32 => [ 0xFF, 0xC1, 0x00 ],
gradient33 => [ 0xFF, 0xB7, 0x00 ],
gradient34 => [ 0xFF, 0xAD, 0x00 ],
gradient35 => [ 0xFF, 0xA3, 0x00 ],
gradient36 => [ 0xFF, 0x99, 0x00 ],
gradient37 => [ 0xFF, 0x8E, 0x00 ],
gradient38 => [ 0xFF, 0x84, 0x00 ],
gradient39 => [ 0xFF, 0x7A, 0x00 ],
gradient40 => [ 0xFF, 0x70, 0x00 ],
gradient41 => [ 0xFF, 0x65, 0x00 ],
gradient42 => [ 0xFF, 0x5B, 0x00 ],
gradient43 => [ 0xFF, 0x51, 0x00 ],
gradient44 => [ 0xFF, 0x47, 0x00 ],
gradient45 => [ 0xFF, 0x3D, 0x00 ],
gradient46 => [ 0xFF, 0x32, 0x00 ],
gradient47 => [ 0xFF, 0x28, 0x00 ],
gradient48 => [ 0xFF, 0x1E, 0x00 ],
gradient49 => [ 0xFF, 0x14, 0x00 ],
gradient50 => [ 0xFF, 0x0A, 0x00 ],
);
if (exists $COLORS{$colkey}){
return ($COLORS{$colkey}[0],$COLORS{$colkey}[1],$COLORS{$colkey}[2]) ;
}
else{
return (0x00, 0x00, 0x00 );
}
}
1;