color_cat 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ab018f08cdb5a48c174cd77955d2a0b10d25a40
4
- data.tar.gz: 3dc47573b97f9de0d639a361ffd18227b04e7db2
3
+ metadata.gz: 54fe574d9e99de5a4ad70f592da5dbb2df347726
4
+ data.tar.gz: 0be429a8d0823514af8f56505bb653ff07b05ba6
5
5
  SHA512:
6
- metadata.gz: b73ee5943c0103db05416ebec63399c2fdfa1587008c9a0400a399162c16e338721224ec209f2eb67c1ebb9ff22a208f59e8f77e3f16dc6a040875d1df17d39a
7
- data.tar.gz: fa72fadd10e7d5777e816f51acdb23df1b8d139420b327521c51ba695b8f8cddb1a13bdbbbf126621dbfd74cdf20e075f786426f2b5a0ef72ca4eedc69aeb20f
6
+ metadata.gz: 08915d8fce29754b657032b83e3b9345069519205ade16d4afc327ca99a67bdbedfe9850656ef5dde92d07846aa9189387fe40d503b7bbab602ce429f0ea6b3d
7
+ data.tar.gz: f0329a20e25d497309a35d2f64ff03ae230cab856b3817ce95017a126919e3f50feb37ead8bf9acd9676bedfa2a839435554974d059b0f52b889a7e194b71baf
@@ -0,0 +1,652 @@
1
+ Colors = {
2
+ "AliceBlue" => [ "blue" , [240,248,255]],
3
+ "CadetBlue" => [ "blue" , [95,158,160]],
4
+ "CadetBlue2" => [ "blue" , [142,229,238]],
5
+ "CadetBlue4" => [ "blue" , [83,134,139]],
6
+ "DarkSlateBlue" => [ "blue" , [72,61,139]],
7
+ "DeepSkyBlue" => [ "blue" , [0,191,255]],
8
+ "DeepSkyBlue2" => [ "blue" , [0,178,238]],
9
+ "DeepSkyBlue4" => [ "blue" , [0,104,139]],
10
+ "DodgerBlue1" => [ "blue" , [30,144,255]],
11
+ "DodgerBlue3" => [ "blue" , [24,116,205]],
12
+ "LightBlue" => [ "blue" , [173,216,230]],
13
+ "LightBlue2" => [ "blue" , [178,223,238]],
14
+ "LightBlue4" => [ "blue" , [104,131,139]],
15
+ "LightCyan1" => [ "blue" , [224,255,255]],
16
+ "LightCyan3" => [ "blue" , [180,205,205]],
17
+ "LightSkyBlue" => [ "blue" , [135,206,250]],
18
+ "LightSkyBlue2" => [ "blue" , [164,211,238]],
19
+ "LightSkyBlue4" => [ "blue" , [96,123,139]],
20
+ "LightSteelBlue" => [ "blue" , [176,196,222]],
21
+ "LightSteelBlue2" => [ "blue" , [188,210,238]],
22
+ "LightSteelBlue4" => [ "blue" , [110,123,139]],
23
+ "MediumBlue" => [ "blue" , [0,0,205]],
24
+ "MediumTurquoise" => [ "blue" , [72,209,204]],
25
+ "NavyBlue" => [ "blue" , [0,0,128]],
26
+ "PaleTurquoise1" => [ "blue" , [187,255,255]],
27
+ "PaleTurquoise3" => [ "blue" , [150,205,205]],
28
+ "PowderBlue" => [ "blue" , [176,224,230]],
29
+ "RoyalBlue1" => [ "blue" , [72,118,255]],
30
+ "RoyalBlue3" => [ "blue" , [58,95,205]],
31
+ "SkyBlue" => [ "blue" , [135,206,235]],
32
+ "SkyBlue2" => [ "blue" , [126,192,238]],
33
+ "SkyBlue4" => [ "blue" , [74,112,139]],
34
+ "SlateBlue1" => [ "blue" , [131,111,255]],
35
+ "SlateBlue3" => [ "blue" , [105,89,205]],
36
+ "SteelBlue" => [ "blue" , [70,130,180]],
37
+ "SteelBlue2" => [ "blue" , [92,172,238]],
38
+ "SteelBlue4" => [ "blue" , [54,100,139]],
39
+ "aquamarine1" => [ "blue" , [127,255,212]],
40
+ "aquamarine3" => [ "blue" , [102,205,170]],
41
+ "azure" => [ "blue" , [240,255,255]],
42
+ "azure2" => [ "blue" , [224,238,238]],
43
+ "azure4" => [ "blue" , [131,139,139]],
44
+ "blue1" => [ "blue" , [0,0,255]],
45
+ "blue3" => [ "blue" , [0,0,205]],
46
+ "cyan" => [ "blue" , [0,255,255]],
47
+ "cyan2" => [ "blue" , [0,238,238]],
48
+ "cyan4" => [ "blue" , [0,139,139]],
49
+ "turquoise" => [ "blue" , [64,224,208]],
50
+ "turquoise2" => [ "blue" , [0,229,238]],
51
+ "turquoise4" => [ "blue" , [0,134,139]],
52
+ "BlueViolet" => [ "blue" , [138,43,226]],
53
+ "CadetBlue1" => [ "blue" , [152,245,255]],
54
+ "CadetBlue3" => [ "blue" , [122,197,205]],
55
+ "CornflowerBlue" => [ "blue" , [100,149,237]],
56
+ "DarkTurquoise" => [ "blue" , [0,206,209]],
57
+ "DeepSkyBlue1" => [ "blue" , [0,191,255]],
58
+ "DeepSkyBlue3" => [ "blue" , [0,154,205]],
59
+ "DodgerBlue" => [ "blue" , [30,144,255]],
60
+ "DodgerBlue2" => [ "blue" , [28,134,238]],
61
+ "DodgerBlue4" => [ "blue" , [16,78,139]],
62
+ "LightBlue1" => [ "blue" , [191,239,255]],
63
+ "LightBlue3" => [ "blue" , [154,192,205]],
64
+ "LightCyan" => [ "blue" , [224,255,255]],
65
+ "LightCyan2" => [ "blue" , [209,238,238]],
66
+ "LightCyan4" => [ "blue" , [122,139,139]],
67
+ "LightSkyBlue1" => [ "blue" , [176,226,255]],
68
+ "LightSkyBlue3" => [ "blue" , [141,182,205]],
69
+ "LightSlateBlue" => [ "blue" , [132,112,255]],
70
+ "LightSteelBlue1" => [ "blue" , [202,225,255]],
71
+ "LightSteelBlue3" => [ "blue" , [162,181,205]],
72
+ "MediumAquamarine" => [ "blue" , [102,205,170]],
73
+ "MediumSlateBlue" => [ "blue" , [123,104,238]],
74
+ "MidnightBlue" => [ "blue" , [25,25,112]],
75
+ "PaleTurquoise" => [ "blue" , [175,238,238]],
76
+ "PaleTurquoise2" => [ "blue" , [174,238,238]],
77
+ "PaleTurquoise4" => [ "blue" , [102,139,139]],
78
+ "RoyalBlue" => [ "blue" , [65,105,225]],
79
+ "RoyalBlue2" => [ "blue" , [67,110,238]],
80
+ "RoyalBlue4" => [ "blue" , [39,64,139]],
81
+ "SkyBlue1" => [ "blue" , [135,206,255]],
82
+ "SkyBlue3" => [ "blue" , [108,166,205]],
83
+ "SlateBlue" => [ "blue" , [106,90,205]],
84
+ "SlateBlue2" => [ "blue" , [122,103,238]],
85
+ "SlateBlue4" => [ "blue" , [71,60,139]],
86
+ "SteelBlue1" => [ "blue" , [99,184,255]],
87
+ "SteelBlue3" => [ "blue" , [79,148,205]],
88
+ "aquamarine" => [ "blue" , [127,255,212]],
89
+ "aquamarine2" => [ "blue" , [118,238,198]],
90
+ "aquamarine4" => [ "blue" , [69,139,116]],
91
+ "azure1" => [ "blue" , [240,255,255]],
92
+ "azure3" => [ "blue" , [193,205,205]],
93
+ "blue" => [ "blue" , [0,0,255]],
94
+ "blue2" => [ "blue" , [0,0,238]],
95
+ "blue4" => [ "blue" , [0,0,139]],
96
+ "cyan1" => [ "blue" , [0,255,255]],
97
+ "cyan3" => [ "blue" , [0,205,205]],
98
+ "navy" => [ "blue" , [0,0,128]],
99
+ "turquoise1" => [ "blue" , [0,245,255]],
100
+ "turquoise3" => [ "blue" , [0,197,205]],
101
+ "black" => [ "black" , [0,0,0]],
102
+ "RosyBrown" => [ "brown" , [188,143,143]],
103
+ "RosyBrown2" => [ "brown" , [238,180,180]],
104
+ "RosyBrown4" => [ "brown" , [139,105,105]],
105
+ "SandyBrown" => [ "brown" , [244,164,96]],
106
+ "brown" => [ "brown" , [165,42,42]],
107
+ "brown2" => [ "brown" , [238,59,59]],
108
+ "brown4" => [ "brown" , [139,35,35]],
109
+ "burlywood1" => [ "brown" , [255,211,155]],
110
+ "burlywood3" => [ "brown" , [205,170,125]],
111
+ "chocolate" => [ "brown" , [210,105,30]],
112
+ "chocolate2" => [ "brown" , [238,118,33]],
113
+ "chocolate4" => [ "brown" , [139,69,19]],
114
+ "tan" => ["brown" , [210,180,140]],
115
+ "tan2" => [ "brown" , [238,154,73]],
116
+ "tan4" => [ "brown" , [139,90,43]],
117
+ "RosyBrown1" => [ "brown" , [255,193,193]],
118
+ "RosyBrown3" => [ "brown" , [205,155,155]],
119
+ "SaddleBrown" => [ "brown" , [139,69,19]],
120
+ "beige" => [ "brown" , [245,245,220]],
121
+ "brown1" => [ "brown" , [255,64,64]],
122
+ "brown3" => [ "brown" , [205,51,51]],
123
+ "burlywood" => [ "brown" , [222,184,135]],
124
+ "burlywood2" => [ "brown" , [238,197,145]],
125
+ "burlywood4" => [ "brown" , [139,115,85]],
126
+ "chocolate1" => [ "brown" , [255,127,36]],
127
+ "chocolate3" => [ "brown" , [205,102,29]],
128
+ "peru" => [ "brown" , [205,133,63]],
129
+ "tan1" => [ "brown" , [255,165,79]],
130
+ "tan3" => [ "brown" , [205,133,63]],
131
+ "DarkSlateGray" => [ "gray" , [47,79,79]],
132
+ "DarkSlateGray2" => [ "gray" , [141,238,238]],
133
+ "DarkSlateGray4" => [ "gray" , [82,139,139]],
134
+ "DimGray" => [ "gray" , [105,105,105]],
135
+ "LightGray" => [ "gray" , [211,211,211]],
136
+ "LightSlateGray" => [ "gray" , [119,136,153]],
137
+ "SlateGray" => [ "gray" , [112,128,144]],
138
+ "SlateGray2" => [ "gray" , [185,211,238]],
139
+ "SlateGray4" => [ "gray" , [108,123,139]],
140
+ "gray" => [ "gray" , [190,190,190]],
141
+ "gray1" => [ "gray" , [3,3,3]],
142
+ "gray100" => [ "gray" , [255,255,255]],
143
+ "gray12" => [ "gray" , [31,31,31]],
144
+ "gray14" => [ "gray" , [36,36,36]],
145
+ "gray16" => [ "gray" , [41,41,41]],
146
+ "gray18" => [ "gray" , [46,46,46]],
147
+ "gray2" => [ "gray" , [5,5,5]],
148
+ "gray21" => [ "gray" , [54,54,54]],
149
+ "gray23" => [ "gray" , [59,59,59]],
150
+ "gray25" => [ "gray" , [64,64,64]],
151
+ "gray27" => [ "gray" , [69,69,69]],
152
+ "gray29" => [ "gray" , [74,74,74]],
153
+ "gray30" => [ "gray" , [77,77,77]],
154
+ "gray32" => [ "gray" , [82,82,82]],
155
+ "gray34" => [ "gray" , [87,87,87]],
156
+ "gray36" => [ "gray" , [92,92,92]],
157
+ "gray38" => [ "gray" , [97,97,97]],
158
+ "gray4" => [ "gray" , [10,10,10]],
159
+ "gray41" => [ "gray" , [105,105,105]],
160
+ "gray43" => [ "gray" , [110,110,110]],
161
+ "gray45" => [ "gray" , [115,115,115]],
162
+ "gray47" => [ "gray" , [120,120,120]],
163
+ "gray49" => [ "gray" , [125,125,125]],
164
+ "gray50" => [ "gray" , [127,127,127]],
165
+ "gray52" => [ "gray" , [133,133,133]],
166
+ "gray54" => [ "gray" , [138,138,138]],
167
+ "gray56" => [ "gray" , [143,143,143]],
168
+ "gray58" => [ "gray" , [148,148,148]],
169
+ "gray6" => [ "gray" , [15,15,15]],
170
+ "gray61" => [ "gray" , [156,156,156]],
171
+ "gray63" => [ "gray" , [161,161,161]],
172
+ "gray65" => [ "gray" , [166,166,166]],
173
+ "gray67" => [ "gray" , [171,171,171]],
174
+ "gray69" => [ "gray" , [176,176,176]],
175
+ "gray70" => [ "gray" , [179,179,179]],
176
+ "gray72" => [ "gray" , [184,184,184]],
177
+ "gray74" => [ "gray" , [189,189,189]],
178
+ "gray76" => [ "gray" , [194,194,194]],
179
+ "gray78" => [ "gray" , [199,199,199]],
180
+ "gray8" => [ "gray" , [20,20,20]],
181
+ "gray81" => [ "gray" , [207,207,207]],
182
+ "gray83" => [ "gray" , [212,212,212]],
183
+ "gray85" => [ "gray" , [217,217,217]],
184
+ "gray87" => [ "gray" , [222,222,222]],
185
+ "gray89" => [ "gray" , [227,227,227]],
186
+ "gray90" => [ "gray" , [229,229,229]],
187
+ "gray92" => [ "gray" , [235,235,235]],
188
+ "gray94" => [ "gray" , [240,240,240]],
189
+ "gray96" => [ "gray" , [245,245,245]],
190
+ "gray98" => [ "gray" , [250,250,250]],
191
+ "grey" => [ "gray" , [190,190,190]],
192
+ "grey1" => [ "gray" , [3,3,3]],
193
+ "grey100" => [ "gray" , [255,255,255]],
194
+ "grey12" => [ "gray" , [31,31,31]],
195
+ "grey14" => [ "gray" , [36,36,36]],
196
+ "grey16" => [ "gray" , [41,41,41]],
197
+ "grey18" => [ "gray" , [46,46,46]],
198
+ "grey2" => [ "gray" , [5,5,5]],
199
+ "grey21" => [ "gray" , [54,54,54]],
200
+ "grey23" => [ "gray" , [59,59,59]],
201
+ "grey25" => [ "gray" , [64,64,64]],
202
+ "grey27" => [ "gray" , [69,69,69]],
203
+ "grey29" => [ "gray" , [74,74,74]],
204
+ "grey30" => [ "gray" , [77,77,77]],
205
+ "grey32" => [ "gray" , [82,82,82]],
206
+ "grey34" => [ "gray" , [87,87,87]],
207
+ "grey36" => [ "gray" , [92,92,92]],
208
+ "grey38" => [ "gray" , [97,97,97]],
209
+ "grey4" => [ "gray" , [10,10,10]],
210
+ "grey41" => [ "gray" , [105,105,105]],
211
+ "grey43" => [ "gray" , [110,110,110]],
212
+ "grey45" => [ "gray" , [115,115,115]],
213
+ "grey47" => [ "gray" , [120,120,120]],
214
+ "grey49" => [ "gray" , [125,125,125]],
215
+ "grey50" => [ "gray" , [127,127,127]],
216
+ "grey52" => [ "gray" , [133,133,133]],
217
+ "grey54" => [ "gray" , [138,138,138]],
218
+ "grey56" => [ "gray" , [143,143,143]],
219
+ "grey58" => [ "gray" , [148,148,148]],
220
+ "grey6" => [ "gray" , [15,15,15]],
221
+ "grey61" => [ "gray" , [156,156,156]],
222
+ "grey63" => [ "gray" , [161,161,161]],
223
+ "grey65" => [ "gray" , [166,166,166]],
224
+ "grey67" => [ "gray" , [171,171,171]],
225
+ "grey69" => [ "gray" , [176,176,176]],
226
+ "grey70" => [ "gray" , [179,179,179]],
227
+ "grey72" => [ "gray" , [184,184,184]],
228
+ "grey74" => [ "gray" , [189,189,189]],
229
+ "grey76" => [ "gray" , [194,194,194]],
230
+ "grey78" => [ "gray" , [199,199,199]],
231
+ "grey8" => [ "gray" , [20,20,20]],
232
+ "grey81" => [ "gray" , [207,207,207]],
233
+ "grey83" => [ "gray" , [212,212,212]],
234
+ "grey85" => [ "gray" , [217,217,217]],
235
+ "grey87" => [ "gray" , [222,222,222]],
236
+ "grey89" => [ "gray" , [227,227,227]],
237
+ "grey90" => [ "gray" , [229,229,229]],
238
+ "grey92" => [ "gray" , [235,235,235]],
239
+ "grey94" => [ "gray" , [240,240,240]],
240
+ "grey96" => [ "gray" , [245,245,245]],
241
+ "grey98" => [ "gray" , [250,250,250]],
242
+ "DarkSlateGray1" => [ "gray" , [151,255,255]],
243
+ "DarkSlateGray3" => [ "gray" , [121,205,205]],
244
+ "DarkSlateGrey" => [ "gray" , [47,79,79]],
245
+ "DimGrey" => [ "gray" , [105,105,105]],
246
+ "LightGrey" => [ "gray" , [211,211,211]],
247
+ "LightSlateGrey" => [ "gray" , [119,136,153]],
248
+ "SlateGray1" => [ "gray" , [198,226,255]],
249
+ "SlateGray3" => [ "gray" , [159,182,205]],
250
+ "SlateGrey" => [ "gray" , [112,128,144]],
251
+ "gray0" => [ "gray" , [0,0,0]],
252
+ "gray10" => [ "gray" , [26,26,26]],
253
+ "gray11" => [ "gray" , [28,28,28]],
254
+ "gray13" => [ "gray" , [33,33,33]],
255
+ "gray15" => [ "gray" , [38,38,38]],
256
+ "gray17" => [ "gray" , [43,43,43]],
257
+ "gray19" => [ "gray" , [48,48,48]],
258
+ "gray20" => [ "gray" , [51,51,51]],
259
+ "gray22" => [ "gray" , [56,56,56]],
260
+ "gray24" => [ "gray" , [61,61,61]],
261
+ "gray26" => [ "gray" , [66,66,66]],
262
+ "gray28" => [ "gray" , [71,71,71]],
263
+ "gray3" => [ "gray" , [8,8,8]],
264
+ "gray31" => [ "gray" , [79,79,79]],
265
+ "gray33" => [ "gray" , [84,84,84]],
266
+ "gray35" => [ "gray" , [89,89,89]],
267
+ "gray37" => [ "gray" , [94,94,94]],
268
+ "gray39" => [ "gray" , [99,99,99]],
269
+ "gray40" => [ "gray" , [102,102,102]],
270
+ "gray42" => [ "gray" , [107,107,107]],
271
+ "gray44" => [ "gray" , [112,112,112]],
272
+ "gray46" => [ "gray" , [117,117,117]],
273
+ "gray48" => [ "gray" , [122,122,122]],
274
+ "gray5" => [ "gray" , [13,13,13]],
275
+ "gray51" => [ "gray" , [130,130,130]],
276
+ "gray53" => [ "gray" , [135,135,135]],
277
+ "gray55" => [ "gray" , [140,140,140]],
278
+ "gray57" => [ "gray" , [145,145,145]],
279
+ "gray59" => [ "gray" , [150,150,150]],
280
+ "gray60" => [ "gray" , [153,153,153]],
281
+ "gray62" => [ "gray" , [158,158,158]],
282
+ "gray64" => [ "gray" , [163,163,163]],
283
+ "gray66" => [ "gray" , [168,168,168]],
284
+ "gray68" => [ "gray" , [173,173,173]],
285
+ "gray7" => [ "gray" , [18,18,18]],
286
+ "gray71" => [ "gray" , [181,181,181]],
287
+ "gray73" => [ "gray" , [186,186,186]],
288
+ "gray75" => [ "gray" , [191,191,191]],
289
+ "gray77" => [ "gray" , [196,196,196]],
290
+ "gray79" => [ "gray" , [201,201,201]],
291
+ "gray80" => [ "gray" , [204,204,204]],
292
+ "gray82" => [ "gray" , [209,209,209]],
293
+ "gray84" => [ "gray" , [214,214,214]],
294
+ "gray86" => [ "gray" , [219,219,219]],
295
+ "gray88" => [ "gray" , [224,224,224]],
296
+ "gray9" => [ "gray" , [23,23,23]],
297
+ "gray91" => [ "gray" , [232,232,232]],
298
+ "gray93" => [ "gray" , [237,237,237]],
299
+ "gray95" => [ "gray" , [242,242,242]],
300
+ "gray97" => [ "gray" , [247,247,247]],
301
+ "gray99" => [ "gray" , [252,252,252]],
302
+ "grey0" => [ "gray" , [0,0,0]],
303
+ "grey10" => [ "gray" , [26,26,26]],
304
+ "grey11" => [ "gray" , [28,28,28]],
305
+ "grey13" => [ "gray" , [33,33,33]],
306
+ "grey15" => [ "gray" , [38,38,38]],
307
+ "grey17" => [ "gray" , [43,43,43]],
308
+ "grey19" => [ "gray" , [48,48,48]],
309
+ "grey20" => [ "gray" , [51,51,51]],
310
+ "grey22" => [ "gray" , [56,56,56]],
311
+ "grey24" => [ "gray" , [61,61,61]],
312
+ "grey26" => [ "gray" , [66,66,66]],
313
+ "grey28" => [ "gray" , [71,71,71]],
314
+ "grey3" => [ "gray" , [8,8,8]],
315
+ "grey31" => [ "gray" , [79,79,79]],
316
+ "grey33" => [ "gray" , [84,84,84]],
317
+ "grey35" => [ "gray" , [89,89,89]],
318
+ "grey37" => [ "gray" , [94,94,94]],
319
+ "grey39" => [ "gray" , [99,99,99]],
320
+ "grey40" => [ "gray" , [102,102,102]],
321
+ "grey42" => [ "gray" , [107,107,107]],
322
+ "grey44" => [ "gray" , [112,112,112]],
323
+ "grey46" => [ "gray" , [117,117,117]],
324
+ "grey48" => [ "gray" , [122,122,122]],
325
+ "grey5" => [ "gray" , [13,13,13]],
326
+ "grey51" => [ "gray" , [130,130,130]],
327
+ "grey53" => [ "gray" , [135,135,135]],
328
+ "grey55" => [ "gray" , [140,140,140]],
329
+ "grey57" => [ "gray" , [145,145,145]],
330
+ "grey59" => [ "gray" , [150,150,150]],
331
+ "grey60" => [ "gray" , [153,153,153]],
332
+ "grey62" => [ "gray" , [158,158,158]],
333
+ "grey64" => [ "gray" , [163,163,163]],
334
+ "grey66" => [ "gray" , [168,168,168]],
335
+ "grey68" => [ "gray" , [173,173,173]],
336
+ "grey7" => [ "gray" , [18,18,18]],
337
+ "grey71" => [ "gray" , [181,181,181]],
338
+ "grey73" => [ "gray" , [186,186,186]],
339
+ "grey75" => [ "gray" , [191,191,191]],
340
+ "grey77" => [ "gray" , [196,196,196]],
341
+ "grey79" => [ "gray" , [201,201,201]],
342
+ "grey80" => [ "gray" , [204,204,204]],
343
+ "grey82" => [ "gray" , [209,209,209]],
344
+ "grey84" => [ "gray" , [214,214,214]],
345
+ "grey86" => [ "gray" , [219,219,219]],
346
+ "grey88" => [ "gray" , [224,224,224]],
347
+ "grey9" => [ "gray" , [23,23,23]],
348
+ "grey91" => [ "gray" , [232,232,232]],
349
+ "grey93" => [ "gray" , [237,237,237]],
350
+ "grey95" => [ "gray" , [242,242,242]],
351
+ "grey97" => [ "gray" , [247,247,247]],
352
+ "grey99" => [ "gray" , [252,252,252]],
353
+ "DarkGreen" => [ "green" , [0,100,0]],
354
+ "DarkOliveGreen" => [ "green" , [85,107,47]],
355
+ "DarkOliveGreen2" => [ "green" , [188,238,104]],
356
+ "DarkOliveGreen4" => [ "green" , [110,139,61]],
357
+ "DarkSeaGreen1" => [ "green" , [193,255,193]],
358
+ "DarkSeaGreen3" => [ "green" , [155,205,155]],
359
+ "ForestGreen" => [ "green" , [34,139,34]],
360
+ "LawnGreen" => [ "green" , [124,252,0]],
361
+ "LimeGreen" => [ "green" , [50,205,50]],
362
+ "MediumSpringGreen" => [ "green" , [0,250,154]],
363
+ "OliveDrab" => [ "green" , [107,142,35]],
364
+ "OliveDrab2" => [ "green" , [179,238,58]],
365
+ "OliveDrab4" => [ "green" , [105,139,34]],
366
+ "PaleGreen1" => [ "green" , [154,255,154]],
367
+ "PaleGreen3" => [ "green" , [124,205,124]],
368
+ "SeaGreen" => [ "green" , [46,139,87]],
369
+ "SeaGreen2" => [ "green" , [78,238,148]],
370
+ "SeaGreen4" => [ "green" , [46,139,87]],
371
+ "SpringGreen1" => [ "green" , [0,255,127]],
372
+ "SpringGreen3" => [ "green" , [0,205,102]],
373
+ "YellowGreen" => [ "green" , [154,205,50]],
374
+ "chartreuse1" => [ "green" , [127,255,0]],
375
+ "chartreuse3" => [ "green" , [102,205,0]],
376
+ "green" => [ "green" , [0,255,0]],
377
+ "green2" => [ "green" , [0,238,0]],
378
+ "green4" => [ "green" , [0,139,0]],
379
+ "khaki1" => [ "green" , [255,246,143]],
380
+ "khaki3" => [ "green" , [205,198,115]],
381
+ "DarkKhaki" => [ "green" , [189,183,107]],
382
+ "DarkOliveGreen1" => [ "green" , [202,255,112]],
383
+ "DarkOliveGreen3" => [ "green" , [162,205,90]],
384
+ "DarkSeaGreen" => [ "green" , [143,188,143]],
385
+ "DarkSeaGreen2" => [ "green" , [180,238,180]],
386
+ "DarkSeaGreen4" => [ "green" , [105,139,105]],
387
+ "GreenYellow" => [ "green" , [173,255,47]],
388
+ "LightSeaGreen" => [ "green" , [32,178,170]],
389
+ "MediumSeaGreen" => [ "green" , [60,179,113]],
390
+ "MintCream" => [ "green" , [245,255,250]],
391
+ "OliveDrab1" => [ "green" , [192,255,62]],
392
+ "OliveDrab3" => [ "green" , [154,205,50]],
393
+ "PaleGreen" => [ "green" , [152,251,152]],
394
+ "PaleGreen2" => [ "green" , [144,238,144]],
395
+ "PaleGreen4" => [ "green" , [84,139,84]],
396
+ "SeaGreen1" => [ "green" , [84,255,159]],
397
+ "SeaGreen3" => [ "green" , [67,205,128]],
398
+ "SpringGreen" => [ "green" , [0,255,127]],
399
+ "SpringGreen2" => [ "green" , [0,238,118]],
400
+ "SpringGreen4" => [ "green" , [0,139,69]],
401
+ "chartreuse" => [ "green" , [127,255,0]],
402
+ "chartreuse2" => [ "green" , [118,238,0]],
403
+ "chartreuse4" => [ "green" , [69,139,0]],
404
+ "green1" => [ "green" , [0,255,0]],
405
+ "green3" => [ "green" , [0,205,0]],
406
+ "khaki" => [ "green" , [240,230,140]],
407
+ "khaki2" => [ "green" , [238,230,133]],
408
+ "khaki4" => [ "green" , [139,134,78]],
409
+ "DarkOrange" => [ "orange" , [255,140,0]],
410
+ "DarkOrange2" => [ "orange" , [238,118,0]],
411
+ "DarkOrange4" => [ "orange" , [139,69,0]],
412
+ "LightCoral" => [ "orange" , [240,128,128]],
413
+ "LightSalmon1" => [ "orange" , [255,160,122]],
414
+ "LightSalmon3" => [ "orange" , [205,129,98]],
415
+ "PeachPuff" => [ "orange" , [255,218,185]],
416
+ "PeachPuff2" => [ "orange" , [238,203,173]],
417
+ "PeachPuff4" => [ "orange" , [139,119,101]],
418
+ "bisque1" => [ "orange" , [255,228,196]],
419
+ "bisque3" => [ "orange" , [205,183,158]],
420
+ "coral" => [ "orange" , [255,127,80]],
421
+ "coral2" => [ "orange" , [238,106,80]],
422
+ "coral4" => [ "orange" , [139,62,47]],
423
+ "honeydew1" => [ "orange" , [240,255,240]],
424
+ "honeydew3" => [ "orange" , [193,205,193]],
425
+ "orange" => [ "orange" , [255,165,0]],
426
+ "orange2" => [ "orange" , [238,154,0]],
427
+ "orange4" => [ "orange" , [139,90,0]],
428
+ "salmon1" => [ "orange" , [255,140,105]],
429
+ "salmon3" => [ "orange" , [205,112,84]],
430
+ "sienna" => [ "orange" , [160,82,45]],
431
+ "sienna2" => [ "orange" , [238,121,66]],
432
+ "sienna4" => [ "orange" , [139,71,38]],
433
+ "DarkOrange1" => [ "orange" , [255,127,0]],
434
+ "DarkOrange3" => [ "orange" , [205,102,0]],
435
+ "DarkSalmon" => [ "orange" , [233,150,122]],
436
+ "LightSalmon" => [ "orange" , [255,160,122]],
437
+ "LightSalmon2" => [ "orange" , [238,149,114]],
438
+ "LightSalmon4" => [ "orange" , [139,87,66]],
439
+ "PeachPuff1" => [ "orange" , [255,218,185]],
440
+ "PeachPuff3" => [ "orange" , [205,175,149]],
441
+ "bisque" => [ "orange" , [255,228,196]],
442
+ "bisque2" => [ "orange" , [238,213,183]],
443
+ "bisque4" => [ "orange" , [139,125,107]],
444
+ "coral1" => [ "orange" , [255,114,86]],
445
+ "coral3" => [ "orange" , [205,91,69]],
446
+ "honeydew" => [ "orange" , [240,255,240]],
447
+ "honeydew2" => [ "orange" , [224,238,224]],
448
+ "honeydew4" => [ "orange" , [131,139,131]],
449
+ "orange1" => [ "orange" , [255,165,0]],
450
+ "orange3" => [ "orange" , [205,133,0]],
451
+ "salmon" => [ "orange" , [250,128,114]],
452
+ "salmon2" => [ "orange" , [238,130,98]],
453
+ "salmon4" => [ "orange" , [139,76,57]],
454
+ "sienna1" => [ "orange" , [255,130,71]],
455
+ "sienna3" => [ "orange" , [205,104,57]],
456
+ "DeepPink" => [ "red" , [255,20,147]],
457
+ "DeepPink2" => [ "red" , [238,18,137]],
458
+ "DeepPink4" => [ "red" , [139,10,80]],
459
+ "HotPink1" => [ "red" , [255,110,180]],
460
+ "HotPink3" => [ "red" , [205,96,144]],
461
+ "IndianRed" => [ "red" , [205,92,92]],
462
+ "IndianRed2" => [ "red" , [238,99,99]],
463
+ "IndianRed4" => [ "red" , [139,58,58]],
464
+ "LightPink1" => [ "red" , [255,174,185]],
465
+ "LightPink3" => [ "red" , [205,140,149]],
466
+ "MediumVioletRed" => [ "red" , [199,21,133]],
467
+ "MistyRose1" => [ "red" , [255,228,225]],
468
+ "MistyRose3" => [ "red" , [205,183,181]],
469
+ "OrangeRed" => [ "red" , [255,69,0]],
470
+ "OrangeRed2" => [ "red" , [238,64,0]],
471
+ "OrangeRed4" => [ "red" , [139,37,0]],
472
+ "PaleVioletRed1" => [ "red" , [255,130,171]],
473
+ "PaleVioletRed3" => [ "red" , [205,104,137]],
474
+ "VioletRed" => [ "red" , [208,32,144]],
475
+ "VioletRed2" => [ "red" , [238,58,140]],
476
+ "VioletRed4" => [ "red" , [139,34,82]],
477
+ "firebrick1" => [ "red" , [255,48,48]],
478
+ "firebrick3" => [ "red" , [205,38,38]],
479
+ "pink" => [ "red" , [255,192,203]],
480
+ "pink2" => [ "red" , [238,169,184]],
481
+ "pink4" => [ "red" , [139,99,108]],
482
+ "red1" => [ "red" , [255,0,0]],
483
+ "red3" => [ "red" , [205,0,0]],
484
+ "tomato" => [ "red" , [255,99,71]],
485
+ "tomato2" => [ "red" , [238,92,66]],
486
+ "tomato4" => [ "red" , [139,54,38]],
487
+ "DeepPink1" => [ "red" , [255,20,147]],
488
+ "DeepPink3" => [ "red" , [205,16,118]],
489
+ "HotPink" => [ "red" , [255,105,180]],
490
+ "HotPink2" => [ "red" , [238,106,167]],
491
+ "HotPink4" => [ "red" , [139,58,98]],
492
+ "IndianRed1" => [ "red" , [255,106,106]],
493
+ "IndianRed3" => [ "red" , [205,85,85]],
494
+ "LightPink" => [ "red" , [255,182,193]],
495
+ "LightPink2" => [ "red" , [238,162,173]],
496
+ "LightPink4" => [ "red" , [139,95,101]],
497
+ "MistyRose" => [ "red" , [255,228,225]],
498
+ "MistyRose2" => [ "red" , [238,213,210]],
499
+ "MistyRose4" => [ "red" , [139,125,123]],
500
+ "OrangeRed1" => [ "red" , [255,69,0]],
501
+ "OrangeRed3" => [ "red" , [205,55,0]],
502
+ "PaleVioletRed" => [ "red" , [219,112,147]],
503
+ "PaleVioletRed2" => [ "red" , [238,121,159]],
504
+ "PaleVioletRed4" => [ "red" , [139,71,93]],
505
+ "VioletRed1" => [ "red" , [255,62,150]],
506
+ "VioletRed3" => [ "red" , [205,50,120]],
507
+ "firebrick" => [ "red" , [178,34,34]],
508
+ "firebrick2" => [ "red" , [238,44,44]],
509
+ "firebrick4" => [ "red" , [139,26,26]],
510
+ "pink1" => [ "red" , [255,181,197]],
511
+ "pink3" => [ "red" , [205,145,158]],
512
+ "red" => ["red" , [255,0,0]],
513
+ "red2" => [ "red" , [238,0,0]],
514
+ "red4" => [ "red" , [139,0,0]],
515
+ "tomato1" => [ "red" , [255,99,71]],
516
+ "tomato3" => [ "red" , [205,79,57]],
517
+ "DarkOrchid" => [ "violet" , [153,50,204]],
518
+ "DarkOrchid2" => [ "violet" , [178,58,238]],
519
+ "DarkOrchid4" => [ "violet" , [104,34,139]],
520
+ "LavenderBlush" => [ "violet" , [255,240,245]],
521
+ "LavenderBlush2" => [ "violet" , [238,224,229]],
522
+ "LavenderBlush4" => [ "violet" , [139,131,134]],
523
+ "MediumOrchid1" => [ "violet" , [224,102,255]],
524
+ "MediumOrchid3" => [ "violet" , [180,82,205]],
525
+ "MediumPurple" => [ "violet" , [147,112,219]],
526
+ "MediumPurple2" => [ "violet" , [159,121,238]],
527
+ "MediumPurple4" => [ "violet" , [93,71,139]],
528
+ "magenta" => [ "violet" , [255,0,255]],
529
+ "magenta2" => [ "violet" , [238,0,238]],
530
+ "magenta4" => [ "violet" , [139,0,139]],
531
+ "maroon1" => [ "violet" , [255,52,179]],
532
+ "maroon3" => [ "violet" , [205,41,144]],
533
+ "orchid" => [ "violet" , [218,112,214]],
534
+ "orchid2" => [ "violet" , [238,122,233]],
535
+ "orchid4" => [ "violet" , [139,71,137]],
536
+ "plum1" => [ "violet" , [255,187,255]],
537
+ "plum3" => [ "violet" , [205,150,205]],
538
+ "purple" => [ "violet" , [160,32,240]],
539
+ "purple2" => [ "violet" , [145,44,238]],
540
+ "purple4" => [ "violet" , [85,26,139]],
541
+ "thistle1" => [ "violet" , [255,225,255]],
542
+ "thistle3" => [ "violet" , [205,181,205]],
543
+ "violet" => [ "violet" , [238,130,238]],
544
+ "DarkOrchid1" => [ "violet" , [191,62,255]],
545
+ "DarkOrchid3" => [ "violet" , [154,50,205]],
546
+ "DarkViolet" => [ "violet" , [148,0,211]],
547
+ "LavenderBlush1" => [ "violet" , [255,240,245]],
548
+ "LavenderBlush3" => [ "violet" , [205,193,197]],
549
+ "MediumOrchid" => [ "violet" , [186,85,211]],
550
+ "MediumOrchid2" => [ "violet" , [209,95,238]],
551
+ "MediumOrchid4" => [ "violet" , [122,55,139]],
552
+ "MediumPurple1" => [ "violet" , [171,130,255]],
553
+ "MediumPurple3" => [ "violet" , [137,104,205]],
554
+ "lavender" => [ "violet" , [230,230,250]],
555
+ "magenta1" => [ "violet" , [255,0,255]],
556
+ "magenta3" => [ "violet" , [205,0,205]],
557
+ "maroon" => [ "violet" , [176,48,96]],
558
+ "maroon2" => [ "violet" , [238,48,167]],
559
+ "maroon4" => [ "violet" , [139,28,98]],
560
+ "orchid1" => [ "violet" , [255,131,250]],
561
+ "orchid3" => [ "violet" , [205,105,201]],
562
+ "plum" => [ "violet" , [221,160,221]],
563
+ "plum2" => [ "violet" , [238,174,238]],
564
+ "plum4" => [ "violet" , [139,102,139]],
565
+ "purple1" => [ "violet" , [155,48,255]],
566
+ "purple3" => [ "violet" , [125,38,205]],
567
+ "thistle" => [ "violet" , [216,191,216]],
568
+ "thistle2" => [ "violet" , [238,210,238]],
569
+ "thistle4" => [ "violet" , [139,123,139]],
570
+ "AntiqueWhite" => [ "white" , [250,235,215]],
571
+ "AntiqueWhite2" => [ "white" , [238,223,204]],
572
+ "AntiqueWhite4" => [ "white" , [139,131,120]],
573
+ "GhostWhite" => [ "white" , [248,248,255]],
574
+ "NavajoWhite1" => [ "white" , [255,222,173]],
575
+ "NavajoWhite3" => [ "white" , [205,179,139]],
576
+ "OldLace" => [ "white" , [253,245,230]],
577
+ "gainsboro" => [ "white" , [220,220,220]],
578
+ "ivory1" => [ "white" , [255,255,240]],
579
+ "ivory3" => [ "white" , [205,205,193]],
580
+ "linen" => [ "white" , [250,240,230]],
581
+ "seashell1" => [ "white" , [255,245,238]],
582
+ "seashell3" => [ "white" , [205,197,191]],
583
+ "snow" => [ "white" , [255,250,250]],
584
+ "snow2" => [ "white" , [238,233,233]],
585
+ "snow4" => [ "white" , [139,137,137]],
586
+ "wheat1" => [ "white" , [255,231,186]],
587
+ "wheat3" => [ "white" , [205,186,150]],
588
+ "white" => [ "white" , [255,255,255]],
589
+ "AntiqueWhite1" => [ "white" , [255,239,219]],
590
+ "AntiqueWhite3" => [ "white" , [205,192,176]],
591
+ "FloralWhite" => [ "white" , [255,250,240]],
592
+ "NavajoWhite" => [ "white" , [255,222,173]],
593
+ "NavajoWhite2" => [ "white" , [238,207,161]],
594
+ "NavajoWhite4" => [ "white" , [139,121,94]],
595
+ "WhiteSmoke" => [ "white" , [245,245,245]],
596
+ "ivory" => [ "white" , [255,255,240]],
597
+ "ivory2" => [ "white" , [238,238,224]],
598
+ "ivory4" => [ "white" , [139,139,131]],
599
+ "seashell" => [ "white" , [255,245,238]],
600
+ "seashell2" => [ "white" , [238,229,222]],
601
+ "seashell4" => [ "white" , [139,134,130]],
602
+ "snow1" => [ "white" , [255,250,250]],
603
+ "snow3" => [ "white" , [205,201,201]],
604
+ "wheat" => [ "white" , [245,222,179]],
605
+ "wheat2" => [ "white" , [238,216,174]],
606
+ "wheat4" => [ "white" , [139,126,102]],
607
+ "BlanchedAlmond" => [ "yellow" , [255,235,205]],
608
+ "DarkGoldenrod1" => [ "yellow" , [255,185,15]],
609
+ "DarkGoldenrod3" => [ "yellow" , [205,149,12]],
610
+ "LemonChiffon" => [ "yellow" , [255,250,205]],
611
+ "LemonChiffon2" => [ "yellow" , [238,233,191]],
612
+ "LemonChiffon4" => [ "yellow" , [139,137,112]],
613
+ "LightGoldenrod1" => [ "yellow" , [255,236,139]],
614
+ "LightGoldenrod3" => [ "yellow" , [205,190,112]],
615
+ "LightGoldenrodYellow" =>[ "yellow" , [250,250,210]],
616
+ "LightYellow1" => [ "yellow" , [255,255,224]],
617
+ "LightYellow3" => [ "yellow" , [205,205,180]],
618
+ "PaleGoldenrod" => [ "yellow" , [238,232,170]],
619
+ "cornsilk" => [ "yellow" , [255,248,220]],
620
+ "cornsilk2" => [ "yellow" , [238,232,205]],
621
+ "cornsilk4" => [ "yellow" , [139,136,120]],
622
+ "gold1" => [ "yellow" , [255,215,0]],
623
+ "gold3" => [ "yellow" , [205,173,0]],
624
+ "goldenrod" => [ "yellow" , [218,165,32]],
625
+ "goldenrod2" => [ "yellow" , [238,180,34]],
626
+ "goldenrod4" => [ "yellow" , [139,105,20]],
627
+ "yellow" => [ "yellow" , [255,255,0]],
628
+ "yellow2" => [ "yellow" , [238,238,0]],
629
+ "yellow4" => [ "yellow" , [139,139,0]],
630
+ "DarkGoldenrod" => [ "yellow" , [184,134,11]],
631
+ "DarkGoldenrod2" => [ "yellow" , [238,173,14]],
632
+ "DarkGoldenrod4" => [ "yellow" , [139,101,8]],
633
+ "LemonChiffon1" => [ "yellow" , [255,250,205]],
634
+ "LemonChiffon3" => [ "yellow" , [205,201,165]],
635
+ "LightGoldenrod" => [ "yellow" , [238,221,130]],
636
+ "LightGoldenrod2" => [ "yellow" , [238,220,130]],
637
+ "LightGoldenrod4" => [ "yellow" , [139,129,76]],
638
+ "LightYellow" => [ "yellow" , [255,255,224]],
639
+ "LightYellow2" => [ "yellow" , [238,238,209]],
640
+ "LightYellow4" => [ "yellow" , [139,139,122]],
641
+ "PapayaWhip" => [ "yellow" , [255,239,213]],
642
+ "cornsilk1" => [ "yellow" , [255,248,220]],
643
+ "cornsilk3" => [ "yellow" , [205,200,177]],
644
+ "gold" => [ "yellow" , [255,215,0]],
645
+ "gold2" => [ "yellow" , [238,201,0]],
646
+ "gold4" => [ "yellow" , [139,117,0]],
647
+ "goldenrod1" => [ "yellow" , [255,193,37]],
648
+ "goldenrod3" => [ "yellow" , [205,155,29]],
649
+ "moccasin" => [ "yellow" , [255,228,181]],
650
+ "yellow1" => [ "yellow" , [255,255,0]],
651
+ "yellow3" => [ "yellow" , [205,205,0]]
652
+ }
@@ -0,0 +1,117 @@
1
+ require "rmagick"
2
+
3
+ module ColorCat
4
+ class Process
5
+ attr_reader :url, :original, :quantized, :primary, :opts, :color_details
6
+
7
+ NUMBER_OF_COLORS = 6
8
+
9
+ def initialize(url, opts={})
10
+ @url = url
11
+ @opts = opts
12
+ @color_details = []
13
+ end
14
+
15
+ def call
16
+ process_image
17
+ normal = sort_by_decreasing_frequency(quantized)
18
+ get_pix(normal)
19
+ end
20
+
21
+ def self.call(url, opts={})
22
+ new(url, opts).call
23
+ end
24
+
25
+ def color_category(my_rgb)
26
+ tmp_dist = 255*3
27
+ tmp_name = "none"
28
+ tmp_category_color = "none"
29
+
30
+ Colors.each_pair do |name, rgb|
31
+ category_color = rgb[0]
32
+ rgb = rgb[1]
33
+ total_dist = Math.sqrt((rgb[0] - my_rgb[0]) ** 2 + (rgb[1] - my_rgb[1]) ** 2 + (rgb[2] - my_rgb[2]) ** 2)
34
+
35
+ if (total_dist < tmp_dist)
36
+ tmp_name = name
37
+ tmp_category_color = category_color
38
+ tmp_dist = total_dist
39
+ end
40
+ end
41
+
42
+ [tmp_category_color, tmp_name]
43
+ end
44
+
45
+ def ignore_white_bg?
46
+ opts[:ignore_white_bg]
47
+ end
48
+
49
+ def color_info
50
+ color_details.compact
51
+ end
52
+
53
+ def to_hex
54
+ color_info.first[:hex]
55
+ end
56
+
57
+ def to_rgb
58
+ color_info.first[:rgb]
59
+ end
60
+
61
+ def intensity
62
+ color_info.first[:intensity]
63
+ end
64
+
65
+ def dominant_category
66
+ color_info.first[:color_cat]
67
+ end
68
+
69
+ def dominant_name
70
+ color_info.first[:color_name]
71
+ end
72
+
73
+
74
+ private
75
+
76
+ def process_image
77
+ @original = Magick::Image.read(url).first
78
+ @quantized = original.quantize(NUMBER_OF_COLORS, Magick::RGBColorspace)
79
+ end
80
+
81
+ def sort_by_decreasing_frequency(img)
82
+ hist = img.color_histogram
83
+ # sort by decreasing frequency
84
+ sorted = hist.keys.sort_by {|p| -hist[p]}
85
+ new_img = Magick::Image.new(hist.size, 1)
86
+ new_img.store_pixels(0, 0, hist.size, 1, sorted)
87
+ end
88
+
89
+ def get_pix(img)
90
+ pixels = img.get_pixels(0, 0, img.columns, 1)
91
+ pixels.map do |p|
92
+ red = (p.red / 257)
93
+ green = (p.green / 257)
94
+ blue = (p.blue / 257)
95
+
96
+ # If the main dominant color is white or close and ignore_white_bg is set
97
+ # skip this loop iteration.
98
+ next if ignore_white_bg? && ((red + green + blue) > 759)
99
+
100
+ my_rgb = [red, green, blue]
101
+ color_category = color_category(my_rgb)[0]
102
+ color_name = color_category(my_rgb)[1]
103
+
104
+ color_details << {
105
+ hex: p.to_color(Magick::AllCompliance, false, 8),
106
+ rgb: my_rgb,
107
+ intensity: p.intensity,
108
+ color_cat: color_category,
109
+ color_name: color_name
110
+ }
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ end
117
+ end
@@ -1,3 +1,3 @@
1
1
  module ColorCat
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,18 @@
1
+ require "helper"
2
+
3
+ describe ColorCat::Process do
4
+
5
+ describe '.call' do
6
+
7
+ it "should create an array of color information about the image" do
8
+ cc = ColorCat::Process.call("http://www.baxterboo.com/global/images/products/large/zanies-neon-lil-yelpers-dog-toy-bright-blue-1.jpg", ignore_white_bg: true)
9
+ cc.color_info.must_equal [{:hex=>"#105DA4", :rgb=>[15, 92, 164], :intensity=>20027, :color_cat=>"blue", :color_name=>"DodgerBlue4"}, {:hex=>"#263C6B", :rgb=>[37, 60, 107], :intensity=>15118, :color_cat=>"blue", :color_name=>"RoyalBlue4"}, {:hex=>"#3488C8", :rgb=>[52, 135, 200], :intensity=>30404, :color_cat=>"blue", :color_name=>"SteelBlue"}, {:hex=>"#CFD7E5", :rgb=>[207, 214, 228], :intensity=>55018, :color_cat=>"gray", :color_name=>"gray85"}, {:hex=>"#ABC8E3", :rgb=>[171, 199, 227], :intensity=>49946, :color_cat=>"blue", :color_name=>"LightSteelBlue"}]
10
+ cc.to_hex.must_equal "#105DA4"
11
+ cc.to_rgb.must_equal [15, 92, 164]
12
+ cc.intensity.must_equal 20027
13
+ cc.dominant_category.must_equal "blue"
14
+ cc.dominant_name.must_equal "DodgerBlue4"
15
+ end
16
+ end
17
+
18
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,34 @@
1
+ # require 'coveralls'
2
+ # Coveralls.wear!
3
+
4
+ begin
5
+ require "bundler"
6
+ rescue LoadError => e
7
+ STDERR.puts e.message
8
+ STDERR.puts "Run `gem install bundler` to install Bundler."
9
+ exit e.status_code
10
+ end
11
+
12
+ begin
13
+ Bundler.setup(:default, :development, :test)
14
+ rescue Bundler::BundlerError => e
15
+ STDERR.puts e.message
16
+ STDERR.puts "Run `bundle install` to install missing gems."
17
+ exit e.status_code
18
+ end
19
+
20
+ require "color_cat"
21
+
22
+ require "minitest/autorun"
23
+ require "vcr"
24
+ require "minitest-vcr"
25
+ require "webmock"
26
+ require "mocha/setup"
27
+ require "faraday"
28
+ require "pry"
29
+ require "pry-debugger"
30
+
31
+ VCR.configure do |c|
32
+ c.cassette_library_dir = 'test/cassettes'
33
+ c.hook_into :webmock
34
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: color_cat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Piccolo
@@ -192,7 +192,11 @@ files:
192
192
  - Rakefile
193
193
  - color_cat.gemspec
194
194
  - lib/color_cat.rb
195
+ - lib/color_cat/colors.rb
196
+ - lib/color_cat/process.rb
195
197
  - lib/color_cat/version.rb
198
+ - test/color_cat/process_test.rb
199
+ - test/helper.rb
196
200
  homepage: ''
197
201
  licenses:
198
202
  - MIT
@@ -217,5 +221,7 @@ rubygems_version: 2.2.1
217
221
  signing_key:
218
222
  specification_version: 4
219
223
  summary: Categorize images by dominant color
220
- test_files: []
224
+ test_files:
225
+ - test/color_cat/process_test.rb
226
+ - test/helper.rb
221
227
  has_rdoc: