punkmaker 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: 44a12cf90683dcbdc1289eb5272daa165010d4e86bd0c31c9eca9d9f6cbfef42
4
- data.tar.gz: 83ea621299ee91bd119ac9583cfc7df5b75ff0efe2e02b5e50e6225f9ba721a3
3
+ metadata.gz: '069854a626106379119b3bd7013fa471c8c127201426e350da67f94848dd449c'
4
+ data.tar.gz: 7149b329b2e0e8b4b657b2ea6310906f22e868138d71985434c16ab30423e8e7
5
5
  SHA512:
6
- metadata.gz: 5e94379084c7172fc7be35986e4f9033287ef42a99bd9aac91c7e2c50087b928051463c6c2e1c615e4b620c72f225158f16b642cad895343b65a1adf75bfbd3d
7
- data.tar.gz: 93fe49aeb67af85fd2fea30d79db2deced0931e38f05ae8d7bbc2b916ab72f02af3568a90989dad8d0ce2246b21308209ecdd969597772c9e2943dabf5034696
6
+ metadata.gz: d7b517729f76418692c5c966ea72e698be67834bfdde19c74bbb1996f137c8c3724c08c7c1b412730ebad02708487a23f4e232dcea1b09f712605032c1cda094
7
+ data.tar.gz: fc5f30b4d5520f91fb8140cef37072042ef7b9d7be6072a7bb8e2182ad095ed00c9a11616acf18498811492a94245fcf9ac6037808f32f15c3ea749fed0754aa
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 0.3.1
1
+ ### 0.3.2
2
2
  ### 0.0.1 / 2023-04-20
3
3
 
4
4
  * Everything is new. First release
data/Manifest.txt CHANGED
@@ -18,6 +18,10 @@ config/robot-female.png
18
18
  config/robot-male.png
19
19
  config/skeleton-female.png
20
20
  config/skeleton-male.png
21
+ config/skintone/color_me_human.csv
22
+ config/skintone/dr_ellis_monk.csv
23
+ config/skintone/punks_not_dead.csv
24
+ config/skintone/ye_olde_punks.csv
21
25
  config/vampire-female.png
22
26
  config/vampire-male.png
23
27
  config/zombie-female.png
@@ -25,6 +29,7 @@ config/zombie-male.png
25
29
  lib/punkmaker.rb
26
30
  lib/punkmaker/alien.rb
27
31
  lib/punkmaker/ape.rb
32
+ lib/punkmaker/colors.rb
28
33
  lib/punkmaker/demon.rb
29
34
  lib/punkmaker/hair.rb
30
35
  lib/punkmaker/human.rb
@@ -32,6 +37,7 @@ lib/punkmaker/mummy.rb
32
37
  lib/punkmaker/orc.rb
33
38
  lib/punkmaker/robot.rb
34
39
  lib/punkmaker/skeleton.rb
40
+ lib/punkmaker/skintone.rb
35
41
  lib/punkmaker/vampire.rb
36
42
  lib/punkmaker/version.rb
37
43
  lib/punkmaker/zombie.rb
data/README.md CHANGED
@@ -33,13 +33,83 @@ punk_f.zoom(4).save( 'human-female_gold@4x.png' )
33
33
 
34
34
  Voila!
35
35
 
36
- ![](i/human-male_gold.png)
37
- ![](i/human-female_gold.png)
36
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_gold.png)
37
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_gold.png)
38
38
 
39
39
  4x
40
40
 
41
- ![](i/human-male_gold@4x.png)
42
- ![](i/human-female_gold@4x.png)
41
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_gold@4x.png)
42
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_gold@4x.png)
43
+
44
+
45
+
46
+ Let's try predefined skintone color names
47
+ (from
48
+ [ye olde punks](config/skintone/ye_olde_punks.csv),
49
+ [dr ellis monk](config/skintone/dr_ellis_monk.csv),
50
+ [punks not dead](config/skintone/punks_not_dead.csv), or
51
+ [color me human](config/skintone/color_me_human.csv)):
52
+
53
+
54
+ ``` ruby
55
+ [
56
+ 'albino', # ye olde punks
57
+ 'dark',
58
+ 'monk10', # dr ellis monk
59
+ 'monk01',
60
+ 'orange', # punk's not dead
61
+ 'almond',
62
+ 'sienna',
63
+ 'a1', # color me human
64
+ ].each do |skintone|
65
+ punk_m = Punk::Human.make( skintone, gender: 'm' )
66
+ punk_m.save( "human-male_#{skintone}.png" )
67
+ punk_m.zoom(4).save( "human-male_#{skintone}@4x.png" )
68
+
69
+ punk_f = Punk::Human.make( skintone, gender: 'f' )
70
+ punk_f.save( "human-female_#{skintone}.png" )
71
+ punk_f.zoom(4).save( "human-female_#{skintone}@4x.png" )
72
+ end
73
+ ```
74
+
75
+
76
+ Voila!
77
+
78
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_albino.png)
79
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_dark.png)
80
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_monk10.png)
81
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_monk01.png)
82
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_orange.png)
83
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_almond.png)
84
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_sienna.png)
85
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_a1.png) <br>
86
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_albino.png)
87
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_dark.png)
88
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_monk10.png)
89
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_monk01.png)
90
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_orange.png)
91
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_almond.png)
92
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_sienna.png)
93
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_a1.png)
94
+
95
+ 4x
96
+
97
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_albino@4x.png)
98
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_dark@4x.png)
99
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_monk10@4x.png)
100
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_monk01@4x.png)
101
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_orange@4x.png)
102
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_almond@4x.png)
103
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_sienna@4x.png)
104
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_a1@4x.png) <br>
105
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_albino@4x.png)
106
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_dark@4x.png)
107
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_monk10@4x.png)
108
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_monk01@4x.png)
109
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_orange@4x.png)
110
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_almond@4x.png)
111
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_sienna@4x.png)
112
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_a1@4x.png)
43
113
 
44
114
 
45
115
 
@@ -74,45 +144,45 @@ end
74
144
 
75
145
  Voila!
76
146
 
77
- ![](i/mummy-male_gold.png)
78
- ![](i/alien-male_gold.png)
79
- ![](i/ape-male_gold.png)
80
- ![](i/skeleton-male_gold.png)
81
- ![](i/zombie-male_gold.png)
82
- ![](i/demon-male_gold.png)
83
- ![](i/orc-male_gold.png)
84
- ![](i/robot-male_gold.png)
85
- ![](i/vampire-male_gold.png) <br>
86
- ![](i/mummy-female_gold.png)
87
- ![](i/alien-female_gold.png)
88
- ![](i/ape-female_gold.png)
89
- ![](i/skeleton-female_gold.png)
90
- ![](i/zombie-female_gold.png)
91
- ![](i/demon-female_gold.png)
92
- ![](i/orc-female_gold.png)
93
- ![](i/robot-female_gold.png)
94
- ![](i/vampire-female_gold.png)
147
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_gold.png)
148
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_gold.png)
149
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_gold.png)
150
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_gold.png)
151
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_gold.png)
152
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_gold.png)
153
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_gold.png)
154
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_gold.png)
155
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_gold.png) <br>
156
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_gold.png)
157
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_gold.png)
158
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_gold.png)
159
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_gold.png)
160
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_gold.png)
161
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_gold.png)
162
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_gold.png)
163
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_gold.png)
164
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_gold.png)
95
165
 
96
166
  4x
97
167
 
98
- ![](i/mummy-male_gold@4x.png)
99
- ![](i/alien-male_gold@4x.png)
100
- ![](i/ape-male_gold@4x.png)
101
- ![](i/skeleton-male_gold@4x.png)
102
- ![](i/zombie-male_gold@4x.png)
103
- ![](i/demon-male_gold@4x.png)
104
- ![](i/orc-male_gold@4x.png)
105
- ![](i/robot-male_gold@4x.png)
106
- ![](i/vampire-male_gold@4x.png) <br>
107
- ![](i/mummy-female_gold@4x.png)
108
- ![](i/alien-female_gold@4x.png)
109
- ![](i/ape-female_gold@4x.png)
110
- ![](i/skeleton-female_gold@4x.png)
111
- ![](i/zombie-female_gold@4x.png)
112
- ![](i/demon-female_gold@4x.png)
113
- ![](i/orc-female_gold@4x.png)
114
- ![](i/robot-female_gold@4x.png)
115
- ![](i/vampire-female_gold@4x.png)
168
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_gold@4x.png)
169
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_gold@4x.png)
170
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_gold@4x.png)
171
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_gold@4x.png)
172
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_gold@4x.png)
173
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_gold@4x.png)
174
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_gold@4x.png)
175
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_gold@4x.png)
176
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_gold@4x.png) <br>
177
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_gold@4x.png)
178
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_gold@4x.png)
179
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_gold@4x.png)
180
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_gold@4x.png)
181
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_gold@4x.png)
182
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_gold@4x.png)
183
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_gold@4x.png)
184
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_gold@4x.png)
185
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_gold@4x.png)
116
186
 
117
187
 
118
188
  Let's try some more colors:
@@ -148,131 +218,131 @@ end
148
218
 
149
219
  Voila!
150
220
 
151
- ![](i/human-male_green.png)
152
- ![](i/mummy-male_green.png)
153
- ![](i/alien-male_green.png)
154
- ![](i/ape-male_green.png)
155
- ![](i/skeleton-male_green.png)
156
- ![](i/zombie-male_green.png)
157
- ![](i/demon-male_green.png)
158
- ![](i/orc-male_green.png)
159
- ![](i/robot-male_green.png)
160
- ![](i/vampire-male_green.png) <br>
161
- ![](i/human-female_green.png)
162
- ![](i/mummy-female_green.png)
163
- ![](i/alien-female_green.png)
164
- ![](i/ape-female_green.png)
165
- ![](i/skeleton-female_green.png)
166
- ![](i/zombie-female_green.png)
167
- ![](i/demon-female_green.png)
168
- ![](i/orc-female_green.png)
169
- ![](i/robot-female_green.png)
170
- ![](i/vampire-female_green.png) <br>
171
- ![](i/human-male_pink.png)
172
- ![](i/mummy-male_pink.png)
173
- ![](i/alien-male_pink.png)
174
- ![](i/ape-male_pink.png)
175
- ![](i/skeleton-male_pink.png)
176
- ![](i/zombie-male_pink.png)
177
- ![](i/demon-male_pink.png)
178
- ![](i/orc-male_pink.png)
179
- ![](i/robot-male_pink.png)
180
- ![](i/vampire-male_pink.png) <br>
181
- ![](i/human-female_pink.png)
182
- ![](i/mummy-female_pink.png)
183
- ![](i/alien-female_pink.png)
184
- ![](i/ape-female_pink.png)
185
- ![](i/skeleton-female_pink.png)
186
- ![](i/zombie-female_pink.png)
187
- ![](i/demon-female_pink.png)
188
- ![](i/orc-female_pink.png)
189
- ![](i/robot-female_pink.png)
190
- ![](i/vampire-female_pink.png) <br>
191
- ![](i/human-male_purple.png)
192
- ![](i/mummy-male_purple.png)
193
- ![](i/alien-male_purple.png)
194
- ![](i/ape-male_purple.png)
195
- ![](i/skeleton-male_purple.png)
196
- ![](i/zombie-male_purple.png)
197
- ![](i/demon-male_purple.png)
198
- ![](i/orc-male_purple.png)
199
- ![](i/robot-male_purple.png)
200
- ![](i/vampire-male_purple.png) <br>
201
- ![](i/human-female_purple.png)
202
- ![](i/mummy-female_purple.png)
203
- ![](i/alien-female_purple.png)
204
- ![](i/ape-female_purple.png)
205
- ![](i/skeleton-female_purple.png)
206
- ![](i/zombie-female_purple.png)
207
- ![](i/demon-female_purple.png)
208
- ![](i/orc-female_purple.png)
209
- ![](i/robot-female_purple.png)
210
- ![](i/vampire-female_purple.png)
221
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_green.png)
222
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_green.png)
223
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_green.png)
224
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_green.png)
225
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_green.png)
226
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_green.png)
227
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_green.png)
228
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_green.png)
229
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_green.png)
230
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_green.png) <br>
231
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_green.png)
232
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_green.png)
233
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_green.png)
234
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_green.png)
235
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_green.png)
236
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_green.png)
237
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_green.png)
238
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_green.png)
239
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_green.png)
240
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_green.png) <br>
241
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_pink.png)
242
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_pink.png)
243
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_pink.png)
244
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_pink.png)
245
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_pink.png)
246
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_pink.png)
247
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_pink.png)
248
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_pink.png)
249
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_pink.png)
250
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_pink.png) <br>
251
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_pink.png)
252
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_pink.png)
253
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_pink.png)
254
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_pink.png)
255
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_pink.png)
256
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_pink.png)
257
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_pink.png)
258
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_pink.png)
259
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_pink.png)
260
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_pink.png) <br>
261
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_purple.png)
262
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_purple.png)
263
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_purple.png)
264
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_purple.png)
265
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_purple.png)
266
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_purple.png)
267
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_purple.png)
268
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_purple.png)
269
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_purple.png)
270
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_purple.png) <br>
271
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_purple.png)
272
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_purple.png)
273
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_purple.png)
274
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_purple.png)
275
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_purple.png)
276
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_purple.png)
277
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_purple.png)
278
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_purple.png)
279
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_purple.png)
280
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_purple.png)
211
281
 
212
282
 
213
283
 
214
284
  4x
215
285
 
216
- ![](i/human-male_green@4x.png)
217
- ![](i/mummy-male_green@4x.png)
218
- ![](i/alien-male_green@4x.png)
219
- ![](i/ape-male_green@4x.png)
220
- ![](i/skeleton-male_green@4x.png)
221
- ![](i/zombie-male_green@4x.png)
222
- ![](i/demon-male_green@4x.png)
223
- ![](i/orc-male_green@4x.png)
224
- ![](i/robot-male_green@4x.png)
225
- ![](i/vampire-male_green@4x.png) <br>
226
- ![](i/human-female_green@4x.png)
227
- ![](i/mummy-female_green@4x.png)
228
- ![](i/alien-female_green@4x.png)
229
- ![](i/ape-female_green@4x.png)
230
- ![](i/skeleton-female_green@4x.png)
231
- ![](i/zombie-female_green@4x.png)
232
- ![](i/demon-female_green@4x.png)
233
- ![](i/orc-female_green@4x.png)
234
- ![](i/robot-female_green@4x.png)
235
- ![](i/vampire-female_green@4x.png) <br>
236
- ![](i/human-male_pink@4x.png)
237
- ![](i/mummy-male_pink@4x.png)
238
- ![](i/alien-male_pink@4x.png)
239
- ![](i/ape-male_pink@4x.png)
240
- ![](i/skeleton-male_pink@4x.png)
241
- ![](i/zombie-male_pink@4x.png)
242
- ![](i/demon-male_pink@4x.png)
243
- ![](i/orc-male_pink@4x.png)
244
- ![](i/robot-male_pink@4x.png)
245
- ![](i/vampire-male_pink@4x.png) <br>
246
- ![](i/human-female_pink@4x.png)
247
- ![](i/mummy-female_pink@4x.png)
248
- ![](i/alien-female_pink@4x.png)
249
- ![](i/ape-female_pink@4x.png)
250
- ![](i/skeleton-female_pink@4x.png)
251
- ![](i/zombie-female_pink@4x.png)
252
- ![](i/demon-female_pink@4x.png)
253
- ![](i/orc-female_pink@4x.png)
254
- ![](i/robot-female_pink@4x.png)
255
- ![](i/vampire-female_pink@4x.png) <br>
256
- ![](i/human-male_purple@4x.png)
257
- ![](i/mummy-male_purple@4x.png)
258
- ![](i/alien-male_purple@4x.png)
259
- ![](i/ape-male_purple@4x.png)
260
- ![](i/skeleton-male_purple@4x.png)
261
- ![](i/zombie-male_purple@4x.png)
262
- ![](i/demon-male_purple@4x.png)
263
- ![](i/orc-male_purple@4x.png)
264
- ![](i/robot-male_purple@4x.png)
265
- ![](i/vampire-male_purple@4x.png) <br>
266
- ![](i/human-female_purple@4x.png)
267
- ![](i/mummy-female_purple@4x.png)
268
- ![](i/alien-female_purple@4x.png)
269
- ![](i/ape-female_purple@4x.png)
270
- ![](i/skeleton-female_purple@4x.png)
271
- ![](i/zombie-female_purple@4x.png)
272
- ![](i/demon-female_purple@4x.png)
273
- ![](i/orc-female_purple@4x.png)
274
- ![](i/robot-female_purple@4x.png)
275
- ![](i/vampire-female_purple@4x.png)
286
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_green@4x.png)
287
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_green@4x.png)
288
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_green@4x.png)
289
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_green@4x.png)
290
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_green@4x.png)
291
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_green@4x.png)
292
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_green@4x.png)
293
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_green@4x.png)
294
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_green@4x.png)
295
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_green@4x.png) <br>
296
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_green@4x.png)
297
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_green@4x.png)
298
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_green@4x.png)
299
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_green@4x.png)
300
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_green@4x.png)
301
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_green@4x.png)
302
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_green@4x.png)
303
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_green@4x.png)
304
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_green@4x.png)
305
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_green@4x.png) <br>
306
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_pink@4x.png)
307
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_pink@4x.png)
308
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_pink@4x.png)
309
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_pink@4x.png)
310
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_pink@4x.png)
311
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_pink@4x.png)
312
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_pink@4x.png)
313
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_pink@4x.png)
314
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_pink@4x.png)
315
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_pink@4x.png) <br>
316
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_pink@4x.png)
317
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_pink@4x.png)
318
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_pink@4x.png)
319
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_pink@4x.png)
320
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_pink@4x.png)
321
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_pink@4x.png)
322
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_pink@4x.png)
323
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_pink@4x.png)
324
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_pink@4x.png)
325
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_pink@4x.png) <br>
326
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-male_purple@4x.png)
327
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-male_purple@4x.png)
328
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-male_purple@4x.png)
329
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-male_purple@4x.png)
330
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-male_purple@4x.png)
331
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-male_purple@4x.png)
332
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-male_purple@4x.png)
333
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-male_purple@4x.png)
334
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-male_purple@4x.png)
335
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-male_purple@4x.png) <br>
336
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/human-female_purple@4x.png)
337
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/mummy-female_purple@4x.png)
338
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/alien-female_purple@4x.png)
339
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/ape-female_purple@4x.png)
340
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/skeleton-female_purple@4x.png)
341
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/zombie-female_purple@4x.png)
342
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/demon-female_purple@4x.png)
343
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/orc-female_purple@4x.png)
344
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/robot-female_purple@4x.png)
345
+ ![](https://github.com/cryptopunksnotdead/punkart.sandbox/raw/master/punkmaker/i/vampire-female_purple@4x.png)
276
346
 
277
347
 
278
348
 
@@ -0,0 +1,78 @@
1
+ color, names
2
+
3
+ 0xF5D7CD, A1
4
+ 0xEEC9C0, A2
5
+ 0xE2B6AF, A3
6
+ 0xD7A89C, A4
7
+ 0xCA958C, A5
8
+ 0xBD877B, A6
9
+ 0xAB756A, A7
10
+ 0x99675A, A8
11
+ 0x86574F, A9
12
+ 0x6F4940, A10
13
+ 0x593D37, A11
14
+
15
+
16
+ 0xF3D8CE, B1
17
+ 0xEDC8BE, B2
18
+ 0xE3B9AC, B3
19
+ 0xD5A99B, B4
20
+ 0xC89784, B5
21
+ 0xB88773, B6
22
+ 0xA77865, B7
23
+ 0x956759, B8
24
+ 0x815949, B9
25
+ 0x6F4B3E, B10
26
+ 0x583D32, B11
27
+
28
+
29
+ 0xF4DACD, C1
30
+ 0xEACDBB, C2
31
+ 0xDCB9A9, C3
32
+ 0xD0AA95, C4
33
+ 0xC69B81, C5
34
+ 0xB68A70, C6
35
+ 0xA4785F, C7
36
+ 0x946D51, C8
37
+ 0x7E5B44, C9
38
+ 0x6C4D3B, C10
39
+ 0x573E31, C11
40
+
41
+
42
+ 0xEFDCCC, D1
43
+ 0xE6CCB8, D2
44
+ 0xDDBBA3, D3
45
+ 0xCCA990, D4
46
+ 0xC39D7F, D5
47
+ 0xB28C6E, D6
48
+ 0xA17B5E, D7
49
+ 0x906B4E, D8
50
+ 0x7D5B43, D9
51
+ 0x674C38, D10
52
+ 0x543F2F, D11
53
+
54
+
55
+ 0xEFDBCA, E1
56
+ 0xE4CBB6, E2
57
+ 0xD8BCA0, E3
58
+ 0xCDAC8E, E4
59
+ 0xC19F7E, E5
60
+ 0xAE8C6C, E6
61
+ 0x9D7A5A, E7
62
+ 0x8D6E4D, E8
63
+ 0x7B5C40, E9
64
+ 0x664D36, E10
65
+ 0x52402D, E11
66
+
67
+
68
+ 0xEDDBCA, F1
69
+ 0xE1CCB6, F2
70
+ 0xD5BDA0, F3
71
+ 0xC8AC8B, F4
72
+ 0xBCA17B, F5
73
+ 0xAE8F6B, F6
74
+ 0x997E57, F7
75
+ 0x876E4B, F8
76
+ 0x776040, F9
77
+ 0x644F33, F10
78
+ 0x52402D, F11
@@ -0,0 +1,11 @@
1
+ color, names
2
+ 0xf6ede4, 01 | MST 01 | monk 01
3
+ 0xf3e7db, 02 | MST 02 | monk 02
4
+ 0xf7ead0, 03 | MST 03 | monk 03
5
+ 0xeadaba, 04 | MST 04 | monk 04
6
+ 0xd7bd96, 05 | MST 05 | monk 05
7
+ 0xa07e56, 06 | MST 06 | monk 06
8
+ 0x825c43, 07 | MST 07 | monk 07
9
+ 0x604134, 08 | MST 08 | monk 08
10
+ 0x3a312a, 09 | MST 09 | monk 09
11
+ 0x292420, 10 | MST 10 | monk 10
@@ -0,0 +1,39 @@
1
+ color, names
2
+
3
+ 0xE9CBA9, ivory
4
+ 0xEFD1B7, porcelain
5
+ 0xF7DDC2, pale ivory
6
+ 0xF7E2AB, warm ivory
7
+ 0xEEC695, sand
8
+ 0xF1C088, rose beige
9
+
10
+ 0xE5BB91, limestone
11
+ 0xECBF84, beige
12
+ 0xD19C7C, sienna
13
+ 0xCD9564, honey
14
+ 0xAD8B65, band
15
+ 0x94603B, almond
16
+
17
+ 0x895434, chestnut
18
+ 0x78441F, bronze
19
+ 0xB06949, umber
20
+ 0x7F4829, golden
21
+ 0x623A17, espresso
22
+ 0x321F11, chocolate
23
+
24
+
25
+ 0xF05423, orange
26
+ 0xEF483E, warm red
27
+ 0xEE3342, red
28
+ 0xD51B5E, rubine red
29
+ 0xda1884, pink | barbie pink
30
+
31
+ 0xAA4399, purple
32
+ 0x462E8D, blue
33
+ 0xBC9BC9, violet
34
+
35
+ 0xF8DE08, yellow
36
+
37
+ 0xffd700, gold 1 | gold
38
+ 0xdaa520, gold 2 | goldenrod
39
+ 0xb8860b, gold 3 | darkgoldenrod
@@ -0,0 +1,5 @@
1
+ color, names
2
+ 0x713f1d, dark | 1
3
+ 0xae8b61, medium | mid | 2
4
+ 0xdbb180, light | 3
5
+ 0xead9d9, albino | 4
@@ -45,7 +45,7 @@ module Alien ## make it a class - why? why not?
45
45
  ## [1.0,s+0.10].min,
46
46
  ## [1.0,l+0.25].min)
47
47
 
48
- color = Color.parse( color ) if color.is_a?( String )
48
+ color = Color.from_hex( color ) if color.is_a?( String )
49
49
 
50
50
  hsv = Color.to_hsv( color )
51
51
  # pp hsv
@@ -69,7 +69,7 @@ def self.derive_color_map( color )
69
69
  # 125 pixels #c8fbfb / rgb(200 251 251) - hsl(180° 86% 88%) - base (use as base)
70
70
  # 6 pixels #9be0e0 / rgb(155 224 224) - hsl(180° 53% 74%) - darker
71
71
  # 2 pixels #75bdbd / rgb(117 189 189) - hsl(180° 35% 60%) - darkest
72
- color = Color.parse( color ) if color.is_a?( String )
72
+ color = Color.from_hex( color ) if color.is_a?( String )
73
73
  base = color
74
74
 
75
75
  hsl = Color.to_hsl( color )
data/lib/punkmaker/ape.rb CHANGED
@@ -23,7 +23,7 @@ module Ape ## make it a class - why? why not?
23
23
  end
24
24
 
25
25
  def self.derive_color_map( color )
26
- color = Color.parse( color ) if color.is_a?( String )
26
+ color = Color.from_hex( color ) if color.is_a?( String )
27
27
 
28
28
  darkest = color
29
29
 
@@ -0,0 +1,60 @@
1
+
2
+ class ColorBundle
3
+
4
+ def self.read( *paths )
5
+ recs = []
6
+ paths.each do |path|
7
+ recs += read_csv( path )
8
+ end
9
+ new( recs )
10
+ end
11
+
12
+ def self.normalize_key( str )
13
+ ## remove all non-alphanum chars (a-z,0-9)
14
+ str.downcase.gsub(/[^a-z0-9]/, '').strip
15
+ end
16
+ def normalize_key( str ) self.class.normalize_key( str ); end
17
+
18
+
19
+ def initialize( recs )
20
+ @recs = recs
21
+ @colors_by_key = _build_colors_by_key( @recs )
22
+ end
23
+
24
+ def records() @recs; end
25
+
26
+ def find_by( name: )
27
+ key = normalize_key( name ) ## normalize q(uery) string/symbol
28
+ @colors_by_key[ key ]
29
+ end
30
+
31
+ def _find( name ) find_by( name: name ); end
32
+ alias_method :[], :_find
33
+
34
+
35
+ ######
36
+ ## helpers
37
+ def _build_colors_by_key( recs )
38
+ h = {}
39
+ recs.each_with_index do |rec|
40
+
41
+ color = Color.from_hex( rec['color'] )
42
+ names = (rec['names'] || '').split( '|' )
43
+
44
+ names.each do |name|
45
+ key = normalize_key( name )
46
+
47
+ if h[ key ]
48
+ puts "!!! ERROR - color name is not unique:"
49
+ pp rec
50
+ puts "duplicate:"
51
+ pp h[key]
52
+ exit 1
53
+ end
54
+ h[ key ] = color
55
+ end
56
+ end
57
+ h
58
+ end
59
+
60
+ end # class ColorBundle
@@ -24,7 +24,7 @@ module Demon ## make it a class - why? why not?
24
24
  end
25
25
 
26
26
  def self.derive_color_map( color )
27
- color = Color.parse( color ) if color.is_a?( String )
27
+ color = Color.from_hex( color ) if color.is_a?( String )
28
28
 
29
29
  # 134 pixels #850008 / rgb(133 0 8) - hsl(356° 100% 26%) - base
30
30
  # 2 pixels #630006 / rgb( 99 0 6) - hsl(356° 100% 19%) - darker
@@ -8,6 +8,25 @@ module Human ## make it a class - why? why not?
8
8
  BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/human-female4.png" )
9
9
 
10
10
 
11
+
12
+ def self.parse_skintone( color ) ## lookup skintone by name or rgb(a) hex string or integer "true color"
13
+ if color.is_a?( String )
14
+ Skintone[ color ] || Color.from_hex( color )
15
+ else ## assume color is integer - assert - why? why not?
16
+ color
17
+ end
18
+ end
19
+
20
+ def self.parse_eye_color( color )
21
+ if color.is_a?( String )
22
+ Color.from_hex( color )
23
+ else
24
+ color
25
+ end
26
+ end
27
+
28
+
29
+
11
30
  def self.make( color=nil,
12
31
  shine: true,
13
32
  eye_color: nil,
@@ -18,14 +37,16 @@ module Human ## make it a class - why? why not?
18
37
  ## note: make a copy of base
19
38
  punk = Image.new( base.width, base.height )
20
39
  punk.compose!( base )
40
+
21
41
 
22
- if color ## change skin tone (& eyebrows)?
23
- color_map = derive_color_map( color )
42
+ skintone = color ? parse_skintone( color ) : nil
43
+ if skintone ## change skin tone (& eyebrows)?
44
+ color_map = derive_color_map( skintone )
24
45
  punk = punk.change_colors( color_map )
25
46
  end
26
47
 
27
48
  if eye_color ## change eye color?
28
- eye_color = Color.parse( eye_color ) if eye_color.is_a?( String )
49
+ eye_color = parse_eye_color( eye_color )
29
50
  if gender == 'm'
30
51
  punk[9,12] = eye_color
31
52
  punk[14,12] = eye_color
@@ -37,7 +58,7 @@ module Human ## make it a class - why? why not?
37
58
 
38
59
  if shine ## add shine?
39
60
  # note: default shine color is white
40
- shine_color = color ? derive_shine( color ) : 0xffffffff
61
+ shine_color = skintone ? derive_shine( skintone ) : 0xffffffff
41
62
  if gender == 'm'
42
63
  punk[9,7] = shine_color
43
64
  punk[8,8] = shine_color
@@ -51,7 +72,7 @@ module Human ## make it a class - why? why not?
51
72
 
52
73
 
53
74
  def self.derive_shine( color )
54
- color = Color.parse( color ) if color.is_a?( String )
75
+ color = Color.from_hex( color ) if color.is_a?( String )
55
76
 
56
77
  hsv = Color.to_hsv( color )
57
78
  # pp hsv
@@ -75,7 +96,7 @@ module Human ## make it a class - why? why not?
75
96
  ## def self.derive_skintone_colors( color or base ) ???
76
97
 
77
98
  def self.derive_color_map( color )
78
- color = Color.parse( color ) if color.is_a?( String )
99
+ color = Color.from_hex( color ) if color.is_a?( String )
79
100
 
80
101
  base = color
81
102
 
@@ -22,7 +22,7 @@ module Punk
22
22
  end
23
23
 
24
24
  if eye_color
25
- eye_color = Color.parse( eye_color ) if eye_color.is_a?( String )
25
+ eye_color = Color.from_hex( eye_color ) if eye_color.is_a?( String )
26
26
 
27
27
  if gender == 'm'
28
28
  punk[9,12] = eye_color
@@ -37,7 +37,7 @@ module Punk
37
37
 
38
38
 
39
39
  def self.derive_color_map( color )
40
- color = Color.parse( color ) if color.is_a?( String )
40
+ color = Color.from_hex( color ) if color.is_a?( String )
41
41
 
42
42
  # 385 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - α( 0%) - TRANSPARENT
43
43
  # 52 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - BLACK
data/lib/punkmaker/orc.rb CHANGED
@@ -23,7 +23,7 @@ module Orc ## make it a class - why? why not?
23
23
  end
24
24
 
25
25
  def self.derive_color_map( color )
26
- color = Color.parse( color ) if color.is_a?( String )
26
+ color = Color.from_hex( color ) if color.is_a?( String )
27
27
 
28
28
  # 380 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - α( 0%) - TRANSPARENT
29
29
  # 63 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - BLACK
@@ -23,7 +23,7 @@ module Robot ## make it a class - why? why not?
23
23
  end
24
24
 
25
25
  def self.derive_color_map( color )
26
- color = Color.parse( color ) if color.is_a?( String )
26
+ color = Color.from_hex( color ) if color.is_a?( String )
27
27
 
28
28
  # 384 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - α( 0%) - TRANSPARENT
29
29
  # 74 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - BLACK
@@ -22,7 +22,7 @@ module Skeleton ## make it a class - why? why not?
22
22
  end
23
23
 
24
24
  def self.derive_color_map( color )
25
- color = Color.parse( color ) if color.is_a?( String )
25
+ color = Color.from_hex( color ) if color.is_a?( String )
26
26
 
27
27
  # 122 pixels #e0e0e0 / rgb(224 224 224) - hsl( 0° 0% 88%) - 8-BIT GRAYSCALE #224
28
28
 
@@ -0,0 +1,16 @@
1
+
2
+ module Punk
3
+ module Skintone
4
+
5
+ def self.bundle
6
+ @bundle ||= ColorBundle.read(
7
+ './config/skintone/ye_olde_punks.csv',
8
+ './config/skintone/color_me_human.csv',
9
+ './config/skintone/dr_ellis_monk.csv',
10
+ './config/skintone/punks_not_dead.csv' )
11
+ end
12
+
13
+ def self.[]( name ) bundle.find_by( name: name ); end
14
+ end # module Skintone
15
+ end # module Punk
16
+
@@ -23,7 +23,7 @@ module Vampire ## make it a class - why? why not?
23
23
  end
24
24
 
25
25
  def self.derive_color_map( color )
26
- color = Color.parse( color ) if color.is_a?( String )
26
+ color = Color.from_hex( color ) if color.is_a?( String )
27
27
 
28
28
  # 366 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - α( 0%) - TRANSPARENT
29
29
  # 67 pixels #000000 / rgb( 0 0 0) - hsl( 0° 0% 0%) - hsv( 0° 0% 0%) - BLACK
@@ -3,7 +3,7 @@ module Pixelart
3
3
  module Punkmaker
4
4
  MAJOR = 0
5
5
  MINOR = 3
6
- PATCH = 1
6
+ PATCH = 2
7
7
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
8
 
9
9
  def self.version
@@ -42,7 +42,7 @@ module Zombie ## make it a class - why? why not?
42
42
  ## [1.0,s+0.10].min,
43
43
  ## [1.0,l+0.25].min)
44
44
 
45
- color = Color.parse( color ) if color.is_a?( String )
45
+ color = Color.from_hex( color ) if color.is_a?( String )
46
46
 
47
47
  hsv = Color.to_hsv( color )
48
48
  # pp hsv
@@ -60,7 +60,7 @@ module Zombie ## make it a class - why? why not?
60
60
 
61
61
 
62
62
  def self.derive_color_map( color )
63
- color = Color.parse( color ) if color.is_a?( String )
63
+ color = Color.from_hex( color ) if color.is_a?( String )
64
64
 
65
65
  # 2 pixels #9bbc88 / rgb(155 188 136) - hsl( 98° 28% 64%) - lighter
66
66
  # 125 pixels #7da269 / rgb(125 162 105) - hsl( 99° 23% 52%) - base (use as base)
data/lib/punkmaker.rb CHANGED
@@ -4,6 +4,10 @@ require 'spritesheet'
4
4
 
5
5
  require_relative 'punkmaker/version' ## let version always go first
6
6
 
7
+ ## support - move to ???
8
+ require_relative 'punkmaker/colors' ## ColorBundle (color by name lookup and mroe)
9
+ require_relative 'punkmaker/skintone'
10
+
7
11
  ## more base / archetypes
8
12
  require_relative 'punkmaker/human'
9
13
  require_relative 'punkmaker/alien'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: punkmaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
@@ -102,6 +102,10 @@ files:
102
102
  - config/robot-male.png
103
103
  - config/skeleton-female.png
104
104
  - config/skeleton-male.png
105
+ - config/skintone/color_me_human.csv
106
+ - config/skintone/dr_ellis_monk.csv
107
+ - config/skintone/punks_not_dead.csv
108
+ - config/skintone/ye_olde_punks.csv
105
109
  - config/vampire-female.png
106
110
  - config/vampire-male.png
107
111
  - config/zombie-female.png
@@ -109,6 +113,7 @@ files:
109
113
  - lib/punkmaker.rb
110
114
  - lib/punkmaker/alien.rb
111
115
  - lib/punkmaker/ape.rb
116
+ - lib/punkmaker/colors.rb
112
117
  - lib/punkmaker/demon.rb
113
118
  - lib/punkmaker/hair.rb
114
119
  - lib/punkmaker/human.rb
@@ -116,6 +121,7 @@ files:
116
121
  - lib/punkmaker/orc.rb
117
122
  - lib/punkmaker/robot.rb
118
123
  - lib/punkmaker/skeleton.rb
124
+ - lib/punkmaker/skintone.rb
119
125
  - lib/punkmaker/vampire.rb
120
126
  - lib/punkmaker/version.rb
121
127
  - lib/punkmaker/zombie.rb