punkmaker 0.3.1 → 0.3.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
  SHA256:
3
- metadata.gz: 44a12cf90683dcbdc1289eb5272daa165010d4e86bd0c31c9eca9d9f6cbfef42
4
- data.tar.gz: 83ea621299ee91bd119ac9583cfc7df5b75ff0efe2e02b5e50e6225f9ba721a3
3
+ metadata.gz: e12bea3bca70b044ca008b68267c1ecb26defe4dd58874fab9910ea8c128af43
4
+ data.tar.gz: 75aa29674ac21933d85c085b08f14023c8e15a1274fca827220839a70ebfad3e
5
5
  SHA512:
6
- metadata.gz: 5e94379084c7172fc7be35986e4f9033287ef42a99bd9aac91c7e2c50087b928051463c6c2e1c615e4b620c72f225158f16b642cad895343b65a1adf75bfbd3d
7
- data.tar.gz: 93fe49aeb67af85fd2fea30d79db2deced0931e38f05ae8d7bbc2b916ab72f02af3568a90989dad8d0ce2246b21308209ecdd969597772c9e2943dabf5034696
6
+ metadata.gz: e455114776d390c9948f6ba2226ee96974db4256f79c07d1a54076e4b8c521a0dc2619e5df404b415dd715ea2537d66bdd3b2aedd2ffd2abc6679f1d9750a54c
7
+ data.tar.gz: a365c4ef9273e33f806685e1dd3f92d2b41ec0aac22c244686922333335ef1efea7c13621a563994d6511859ffc3793270642e7b4cd9abc37a1f95410bc53be8
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 0.3.1
1
+ ### 0.3.3
2
2
  ### 0.0.1 / 2023-04-20
3
3
 
4
4
  * Everything is new. First release
data/Manifest.txt CHANGED
@@ -6,6 +6,8 @@ config/alien-female.png
6
6
  config/alien-male.png
7
7
  config/ape-female.png
8
8
  config/ape-male.png
9
+ config/colors/eyes.csv
10
+ config/colors/hair.csv
9
11
  config/demon-female.png
10
12
  config/demon-male.png
11
13
  config/human-female4.png
@@ -18,20 +20,27 @@ config/robot-female.png
18
20
  config/robot-male.png
19
21
  config/skeleton-female.png
20
22
  config/skeleton-male.png
23
+ config/skintone/color_me_human.csv
24
+ config/skintone/dr_ellis_monk.csv
25
+ config/skintone/punks_not_dead.csv
26
+ config/skintone/ye_olde_punks.csv
21
27
  config/vampire-female.png
22
28
  config/vampire-male.png
23
29
  config/zombie-female.png
24
30
  config/zombie-male.png
25
31
  lib/punkmaker.rb
26
- lib/punkmaker/alien.rb
27
- lib/punkmaker/ape.rb
28
- lib/punkmaker/demon.rb
32
+ lib/punkmaker/colors.rb
33
+ lib/punkmaker/eyes.rb
29
34
  lib/punkmaker/hair.rb
30
- lib/punkmaker/human.rb
31
- lib/punkmaker/mummy.rb
32
- lib/punkmaker/orc.rb
33
- lib/punkmaker/robot.rb
34
- lib/punkmaker/skeleton.rb
35
- lib/punkmaker/vampire.rb
35
+ lib/punkmaker/skintone.rb
36
+ lib/punkmaker/type/alien.rb
37
+ lib/punkmaker/type/ape.rb
38
+ lib/punkmaker/type/demon.rb
39
+ lib/punkmaker/type/human.rb
40
+ lib/punkmaker/type/mummy.rb
41
+ lib/punkmaker/type/orc.rb
42
+ lib/punkmaker/type/robot.rb
43
+ lib/punkmaker/type/skeleton.rb
44
+ lib/punkmaker/type/vampire.rb
45
+ lib/punkmaker/type/zombie.rb
36
46
  lib/punkmaker/version.rb
37
- 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,8 @@
1
+ color, names
2
+
3
+ 0x259FAC, blue | b
4
+ 0x8EA226, green | g
5
+ 0x682B15, brown
6
+ 0x792CC7, purple
7
+
8
+ 0xFF0000, red | r
@@ -0,0 +1,16 @@
1
+ color, names
2
+
3
+ 0x000000, black
4
+ 0x51360c, brown # (darker) brown
5
+ 0xa66e2c, brunette # lighter brown
6
+
7
+ 0xe65700, orange
8
+ 0xe22626, red
9
+ 0xff8ebe, pink
10
+ 0x710cc7, purple
11
+
12
+ 0x28b143, green
13
+
14
+ 0xfff68e, blonde
15
+ 0xe0e0e0, silver
16
+ 0xffffff, white
@@ -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
@@ -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
@@ -0,0 +1,12 @@
1
+
2
+ module Punk
3
+ module Eyes
4
+
5
+ def self.colors
6
+ @colors ||= ColorBundle.read( './config/colors/eyes.csv' )
7
+ end
8
+ def self.[]( name ) colors.find_by( name: name ); end
9
+
10
+ end # module Eyes
11
+ end # module Punk
12
+
@@ -2,34 +2,15 @@
2
2
 
3
3
  module Punk
4
4
  module Hair
5
- def self.colors
6
- @colors ||= begin
7
- {
8
- 'black' => '000000',
9
-
10
- 'brown' => '51360c', # (darker) brown
11
- 'brunette' => 'a66e2c', # lighter brown
12
-
13
- 'orange' => 'e65700',
14
- 'red' => 'e22626',
15
- 'pink' => 'ff8ebe',
16
- 'purple' => '710cc7',
17
-
18
- 'green' => '28b143',
19
-
20
- 'blonde' => 'fff68e',
21
- 'silver' => 'e0e0e0',
22
- 'white' => 'FFFFFF',
23
- }.reduce( {} ) do |h, (name, color_hex)|
24
- h[ name ] = Color.from_hex( color_hex )
25
- h
26
- end
27
- end
28
- @colors
5
+ def self.colors
6
+ @colors ||= ColorBundle.read( './config/colors/hair.csv' )
29
7
  end
8
+ def self.[]( name ) colors.find_by( name: name ); end
9
+
10
+
30
11
 
31
12
  def self.derive_color_map( color )
32
- color = Color.parse( color ) if color.is_a?( String )
13
+ color = Color.from_hex( color ) if color.is_a?( String )
33
14
 
34
15
  h,s,v = Color.to_hsv( color, include_alpha: false )
35
16
  h = h % 360 ## make sure h(ue) is always positive!!!
@@ -98,6 +79,7 @@ module Punk
98
79
  end
99
80
  def find_by( name: ) @sheet.find_by( name: name ); end
100
81
 
82
+
101
83
  def make( style, color: 'black' ) ## change name to colorize - why? why not?
102
84
  ## pass-through shavedhead (no colors - alpha only) - why? why not?
103
85
  hair = @sheet.find_by( name: style )
@@ -106,16 +88,19 @@ module Punk
106
88
  exit 1
107
89
  end
108
90
 
109
- color_key = color.downcase.gsub(' ','')
110
- rgba = @colors[ color_key ]
111
- if rgba.nil?
112
- puts "!! ERROR - unknow hair color >#{style}<; sorry"
113
- exit 1
114
- end
115
-
116
- color_map = Hair.derive_color_map( rgba )
91
+ color = parse_hair_color( color )
92
+
93
+ color_map = Hair.derive_color_map( color )
117
94
  hair.change_colors( color_map )
118
95
  end
96
+
97
+ def parse_hair_color( color )
98
+ if color.is_a?( String )
99
+ @colors[ color ] || Color.from_hex( color )
100
+ else ## assume color is integer - assert - why? why not?
101
+ color
102
+ end
103
+ end
119
104
  end ## (embedded) class Maker
120
105
  end # module Hair
121
106
  end # module Punk
@@ -0,0 +1,16 @@
1
+
2
+ module Punk
3
+ module Skintone
4
+
5
+ def self.colors
6
+ @colors ||= 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
+ def self.[]( name ) colors.find_by( name: name ); end
13
+
14
+ end # module Skintone
15
+ end # module Punk
16
+
@@ -7,17 +7,23 @@ module Alien ## make it a class - why? why not?
7
7
  BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/alien-male.png" )
8
8
  BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/alien-female.png" )
9
9
 
10
+
11
+ def self.base( gender: 'm' )
12
+ base = gender == 'm' ? BASE_M : BASE_F
13
+
14
+ ## note: make a copy of base
15
+ punk = Image.new( base.width, base.height )
16
+ punk.compose!( base )
17
+ punk
18
+ end
19
+
10
20
 
11
21
  def self.make( color=nil,
12
22
  shine: true,
13
23
  gender: 'm' )
14
24
 
15
- base = gender == 'm' ? BASE_M : BASE_F
16
-
17
- ## note: make a copy of base
18
- punk = Image.new( base.width, base.height )
19
- punk.compose!( base )
20
-
25
+ punk = base( gender: gender ) ## get base image (as a copy to modify)
26
+
21
27
  if color ## change skin tone (& eyebrows)?
22
28
  color_map = derive_color_map( color )
23
29
  punk = punk.change_colors( color_map )
@@ -45,7 +51,7 @@ module Alien ## make it a class - why? why not?
45
51
  ## [1.0,s+0.10].min,
46
52
  ## [1.0,l+0.25].min)
47
53
 
48
- color = Color.parse( color ) if color.is_a?( String )
54
+ color = Color.from_hex( color ) if color.is_a?( String )
49
55
 
50
56
  hsv = Color.to_hsv( color )
51
57
  # pp hsv
@@ -69,7 +75,7 @@ def self.derive_color_map( color )
69
75
  # 125 pixels #c8fbfb / rgb(200 251 251) - hsl(180° 86% 88%) - base (use as base)
70
76
  # 6 pixels #9be0e0 / rgb(155 224 224) - hsl(180° 53% 74%) - darker
71
77
  # 2 pixels #75bdbd / rgb(117 189 189) - hsl(180° 35% 60%) - darkest
72
- color = Color.parse( color ) if color.is_a?( String )
78
+ color = Color.from_hex( color ) if color.is_a?( String )
73
79
  base = color
74
80
 
75
81
  hsl = Color.to_hsl( color )
@@ -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
 
@@ -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,24 +8,49 @@ 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
+ Eyes[ color ] || Color.from_hex( color )
23
+ else
24
+ color
25
+ end
26
+ end
27
+
28
+
29
+ def self.base( gender: 'm' )
30
+ base = gender == 'm' ? BASE_M : BASE_F
31
+
32
+ ## note: make a copy of base
33
+ punk = Image.new( base.width, base.height )
34
+ punk.compose!( base )
35
+ punk
36
+ end
37
+
38
+
11
39
  def self.make( color=nil,
12
40
  shine: true,
13
41
  eye_color: nil,
14
42
  gender: 'm' )
15
43
 
16
- base = gender == 'm' ? BASE_M : BASE_F
17
-
18
- ## note: make a copy of base
19
- punk = Image.new( base.width, base.height )
20
- punk.compose!( base )
44
+ punk = base( gender: gender )
21
45
 
22
- if color ## change skin tone (& eyebrows)?
23
- color_map = derive_color_map( color )
46
+ skintone = color ? parse_skintone( color ) : nil
47
+ if skintone ## change skin tone (& eyebrows)?
48
+ color_map = derive_color_map( skintone )
24
49
  punk = punk.change_colors( color_map )
25
50
  end
26
51
 
27
52
  if eye_color ## change eye color?
28
- eye_color = Color.parse( eye_color ) if eye_color.is_a?( String )
53
+ eye_color = parse_eye_color( eye_color )
29
54
  if gender == 'm'
30
55
  punk[9,12] = eye_color
31
56
  punk[14,12] = eye_color
@@ -37,7 +62,7 @@ module Human ## make it a class - why? why not?
37
62
 
38
63
  if shine ## add shine?
39
64
  # note: default shine color is white
40
- shine_color = color ? derive_shine( color ) : 0xffffffff
65
+ shine_color = skintone ? derive_shine( skintone ) : 0xffffffff
41
66
  if gender == 'm'
42
67
  punk[9,7] = shine_color
43
68
  punk[8,8] = shine_color
@@ -51,7 +76,7 @@ module Human ## make it a class - why? why not?
51
76
 
52
77
 
53
78
  def self.derive_shine( color )
54
- color = Color.parse( color ) if color.is_a?( String )
79
+ color = Color.from_hex( color ) if color.is_a?( String )
55
80
 
56
81
  hsv = Color.to_hsv( color )
57
82
  # pp hsv
@@ -75,7 +100,7 @@ module Human ## make it a class - why? why not?
75
100
  ## def self.derive_skintone_colors( color or base ) ???
76
101
 
77
102
  def self.derive_color_map( color )
78
- color = Color.parse( color ) if color.is_a?( String )
103
+ color = Color.from_hex( color ) if color.is_a?( String )
79
104
 
80
105
  base = color
81
106
 
@@ -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
@@ -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
 
@@ -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
@@ -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)
@@ -3,7 +3,7 @@ module Pixelart
3
3
  module Punkmaker
4
4
  MAJOR = 0
5
5
  MINOR = 3
6
- PATCH = 1
6
+ PATCH = 3
7
7
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
8
 
9
9
  def self.version
data/lib/punkmaker.rb CHANGED
@@ -4,17 +4,23 @@ 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
+ require_relative 'punkmaker/eyes'
11
+
12
+
7
13
  ## more base / archetypes
8
- require_relative 'punkmaker/human'
9
- require_relative 'punkmaker/alien'
10
- require_relative 'punkmaker/mummy'
11
- require_relative 'punkmaker/ape'
12
- require_relative 'punkmaker/skeleton'
13
- require_relative 'punkmaker/zombie'
14
- require_relative 'punkmaker/demon'
15
- require_relative 'punkmaker/orc'
16
- require_relative 'punkmaker/robot'
17
- require_relative 'punkmaker/vampire'
14
+ require_relative 'punkmaker/type/human'
15
+ require_relative 'punkmaker/type/alien'
16
+ require_relative 'punkmaker/type/mummy'
17
+ require_relative 'punkmaker/type/ape'
18
+ require_relative 'punkmaker/type/skeleton'
19
+ require_relative 'punkmaker/type/zombie'
20
+ require_relative 'punkmaker/type/demon'
21
+ require_relative 'punkmaker/type/orc'
22
+ require_relative 'punkmaker/type/robot'
23
+ require_relative 'punkmaker/type/vampire'
18
24
 
19
25
 
20
26
  ## more hair (incl. beards & eyebrows)
metadata CHANGED
@@ -1,14 +1,14 @@
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-01 00:00:00.000000000 Z
11
+ date: 2023-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pixelart
@@ -90,6 +90,8 @@ files:
90
90
  - config/alien-male.png
91
91
  - config/ape-female.png
92
92
  - config/ape-male.png
93
+ - config/colors/eyes.csv
94
+ - config/colors/hair.csv
93
95
  - config/demon-female.png
94
96
  - config/demon-male.png
95
97
  - config/human-female4.png
@@ -102,23 +104,30 @@ files:
102
104
  - config/robot-male.png
103
105
  - config/skeleton-female.png
104
106
  - config/skeleton-male.png
107
+ - config/skintone/color_me_human.csv
108
+ - config/skintone/dr_ellis_monk.csv
109
+ - config/skintone/punks_not_dead.csv
110
+ - config/skintone/ye_olde_punks.csv
105
111
  - config/vampire-female.png
106
112
  - config/vampire-male.png
107
113
  - config/zombie-female.png
108
114
  - config/zombie-male.png
109
115
  - lib/punkmaker.rb
110
- - lib/punkmaker/alien.rb
111
- - lib/punkmaker/ape.rb
112
- - lib/punkmaker/demon.rb
116
+ - lib/punkmaker/colors.rb
117
+ - lib/punkmaker/eyes.rb
113
118
  - lib/punkmaker/hair.rb
114
- - lib/punkmaker/human.rb
115
- - lib/punkmaker/mummy.rb
116
- - lib/punkmaker/orc.rb
117
- - lib/punkmaker/robot.rb
118
- - lib/punkmaker/skeleton.rb
119
- - lib/punkmaker/vampire.rb
119
+ - lib/punkmaker/skintone.rb
120
+ - lib/punkmaker/type/alien.rb
121
+ - lib/punkmaker/type/ape.rb
122
+ - lib/punkmaker/type/demon.rb
123
+ - lib/punkmaker/type/human.rb
124
+ - lib/punkmaker/type/mummy.rb
125
+ - lib/punkmaker/type/orc.rb
126
+ - lib/punkmaker/type/robot.rb
127
+ - lib/punkmaker/type/skeleton.rb
128
+ - lib/punkmaker/type/vampire.rb
129
+ - lib/punkmaker/type/zombie.rb
120
130
  - lib/punkmaker/version.rb
121
- - lib/punkmaker/zombie.rb
122
131
  homepage: https://github.com/cryptopunksnotdead/punkart.sandbox
123
132
  licenses:
124
133
  - Public Domain