punkmaker 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/config/alien-female.png +0 -0
- data/config/alien-male.png +0 -0
- data/config/human-female4.png +0 -0
- data/config/human-male4.png +0 -0
- data/config/zombie-female.png +0 -0
- data/config/zombie-male.png +0 -0
- data/lib/punkmaker/alien.rb +48 -14
- data/lib/punkmaker/ape.rb +14 -11
- data/lib/punkmaker/demon.rb +14 -10
- data/lib/punkmaker/human.rb +56 -41
- data/lib/punkmaker/mummy.rb +16 -11
- data/lib/punkmaker/orc.rb +13 -10
- data/lib/punkmaker/robot.rb +13 -10
- data/lib/punkmaker/skeleton.rb +13 -10
- data/lib/punkmaker/vampire.rb +13 -10
- data/lib/punkmaker/version.rb +1 -1
- data/lib/punkmaker/zombie.rb +48 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44a12cf90683dcbdc1289eb5272daa165010d4e86bd0c31c9eca9d9f6cbfef42
|
4
|
+
data.tar.gz: 83ea621299ee91bd119ac9583cfc7df5b75ff0efe2e02b5e50e6225f9ba721a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e94379084c7172fc7be35986e4f9033287ef42a99bd9aac91c7e2c50087b928051463c6c2e1c615e4b620c72f225158f16b642cad895343b65a1adf75bfbd3d
|
7
|
+
data.tar.gz: 93fe49aeb67af85fd2fea30d79db2deced0931e38f05ae8d7bbc2b916ab72f02af3568a90989dad8d0ce2246b21308209ecdd969597772c9e2943dabf5034696
|
data/CHANGELOG.md
CHANGED
data/config/alien-female.png
CHANGED
Binary file
|
data/config/alien-male.png
CHANGED
Binary file
|
data/config/human-female4.png
CHANGED
Binary file
|
data/config/human-male4.png
CHANGED
Binary file
|
data/config/zombie-female.png
CHANGED
Binary file
|
data/config/zombie-male.png
CHANGED
Binary file
|
data/lib/punkmaker/alien.rb
CHANGED
@@ -8,19 +8,60 @@ module Alien ## make it a class - why? why not?
|
|
8
8
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/alien-female.png" )
|
9
9
|
|
10
10
|
|
11
|
-
def self.make( color,
|
11
|
+
def self.make( color=nil,
|
12
|
+
shine: true,
|
12
13
|
gender: 'm' )
|
13
|
-
color_map = derive_color_map( color )
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
+
|
21
|
+
if color ## change skin tone (& eyebrows)?
|
22
|
+
color_map = derive_color_map( color )
|
23
|
+
punk = punk.change_colors( color_map )
|
20
24
|
end
|
25
|
+
|
26
|
+
|
27
|
+
if shine
|
28
|
+
shine_color = color ? derive_shine( color ) : 0xf1ffffff
|
29
|
+
if gender == 'm'
|
30
|
+
punk[9,7] = shine_color
|
31
|
+
punk[8,8] = shine_color
|
32
|
+
else
|
33
|
+
punk[9,9] = shine_color
|
34
|
+
end
|
35
|
+
end
|
21
36
|
punk
|
22
37
|
end
|
23
38
|
|
39
|
+
|
40
|
+
def self.derive_shine( color )
|
41
|
+
## was before - reuse old formula- why? why not?
|
42
|
+
## todo/check - check "formula" used in skintones script for humans!!!
|
43
|
+
## lighter = Color.from_hsl(
|
44
|
+
## (h+1)%360, # todo/check: make lighter by -1 on hue? or +1????
|
45
|
+
## [1.0,s+0.10].min,
|
46
|
+
## [1.0,l+0.25].min)
|
47
|
+
|
48
|
+
color = Color.parse( color ) if color.is_a?( String )
|
49
|
+
|
50
|
+
hsv = Color.to_hsv( color )
|
51
|
+
# pp hsv
|
52
|
+
|
53
|
+
h, s, v = hsv
|
54
|
+
h = h % 360 # make always positive (might be -50 or such)
|
55
|
+
## pp [h,s,v]
|
56
|
+
|
57
|
+
## add extra saturation if v(alue) / brightness is max 1.0 - why? why not?
|
58
|
+
sdiff = v >= 0.99 ? 0.35 : 0.25
|
59
|
+
|
60
|
+
lighter = Color.from_hsv( h, [0.0, s-sdiff].max, [v+0.1,1.0].min )
|
61
|
+
lighter
|
62
|
+
end
|
63
|
+
|
64
|
+
|
24
65
|
|
25
66
|
def self.derive_color_map( color )
|
26
67
|
|
@@ -38,12 +79,6 @@ h, s, l = hsl
|
|
38
79
|
h = h % 360 # make always positive (might be -50 or such)
|
39
80
|
pp [h,s,l]
|
40
81
|
|
41
|
-
## todo/check - check "formula" used in skintones script for humans!!!
|
42
|
-
lighter = Color.from_hsl(
|
43
|
-
(h+1)%360, # todo/check: make lighter by -1 on hue? or +1????
|
44
|
-
[1.0,s+0.10].min,
|
45
|
-
[1.0,l+0.25].min)
|
46
|
-
|
47
82
|
|
48
83
|
darker = Color.from_hsl(
|
49
84
|
h,
|
@@ -58,7 +93,6 @@ darkest = Color.from_hsl(
|
|
58
93
|
|
59
94
|
color_map = {
|
60
95
|
'#c8fbfb' => base,
|
61
|
-
'#f1ffff' => lighter,
|
62
96
|
'#9be0e0' => darker,
|
63
97
|
'#75bdbd' => darkest,
|
64
98
|
}
|
data/lib/punkmaker/ape.rb
CHANGED
@@ -6,18 +6,21 @@ module Ape ## make it a class - why? why not?
|
|
6
6
|
BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/ape-male.png" )
|
7
7
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/ape-female.png" )
|
8
8
|
|
9
|
-
def self.make( color,
|
9
|
+
def self.make( color=nil,
|
10
10
|
gender: 'm' )
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
punk
|
20
|
-
|
11
|
+
base = gender == 'm' ? BASE_M : BASE_F
|
12
|
+
|
13
|
+
## note: make a copy of base
|
14
|
+
punk = Image.new( base.width, base.height )
|
15
|
+
punk.compose!( base )
|
16
|
+
|
17
|
+
if color
|
18
|
+
color_map = derive_color_map( color )
|
19
|
+
punk = punk.change_colors( color_map )
|
20
|
+
end
|
21
|
+
|
22
|
+
punk
|
23
|
+
end
|
21
24
|
|
22
25
|
def self.derive_color_map( color )
|
23
26
|
color = Color.parse( color ) if color.is_a?( String )
|
data/lib/punkmaker/demon.rb
CHANGED
@@ -6,17 +6,21 @@ module Demon ## make it a class - why? why not?
|
|
6
6
|
BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/demon-male.png" )
|
7
7
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/demon-female.png" )
|
8
8
|
|
9
|
-
def self.make( color,
|
9
|
+
def self.make( color=nil,
|
10
10
|
gender: 'm' )
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
punk
|
11
|
+
base = gender == 'm' ? BASE_M : BASE_F
|
12
|
+
|
13
|
+
## note: make a copy of base
|
14
|
+
punk = Image.new( base.width, base.height )
|
15
|
+
punk.compose!( base )
|
16
|
+
|
17
|
+
if color
|
18
|
+
color_map = derive_color_map( color )
|
19
|
+
punk = punk.change_colors( color_map )
|
20
|
+
end
|
21
|
+
|
22
|
+
punk
|
23
|
+
|
20
24
|
end
|
21
25
|
|
22
26
|
def self.derive_color_map( color )
|
data/lib/punkmaker/human.rb
CHANGED
@@ -8,45 +8,72 @@ 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
|
-
def self.make( color,
|
11
|
+
def self.make( color=nil,
|
12
|
+
shine: true,
|
12
13
|
eye_color: nil,
|
13
14
|
gender: 'm' )
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
punk =
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
15
|
+
|
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 )
|
21
|
+
|
22
|
+
if color ## change skin tone (& eyebrows)?
|
23
|
+
color_map = derive_color_map( color )
|
24
|
+
punk = punk.change_colors( color_map )
|
25
|
+
end
|
26
|
+
|
27
|
+
if eye_color ## change eye color?
|
28
|
+
eye_color = Color.parse( eye_color ) if eye_color.is_a?( String )
|
29
|
+
if gender == 'm'
|
30
|
+
punk[9,12] = eye_color
|
31
|
+
punk[14,12] = eye_color
|
32
|
+
else
|
33
|
+
punk[9,13] = eye_color
|
34
|
+
punk[14,13] = eye_color
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
if shine ## add shine?
|
39
|
+
# note: default shine color is white
|
40
|
+
shine_color = color ? derive_shine( color ) : 0xffffffff
|
41
|
+
if gender == 'm'
|
42
|
+
punk[9,7] = shine_color
|
43
|
+
punk[8,8] = shine_color
|
44
|
+
else
|
45
|
+
punk[9,9] = shine_color
|
46
|
+
end
|
37
47
|
end
|
38
48
|
|
39
49
|
punk
|
40
50
|
end
|
41
51
|
|
42
52
|
|
53
|
+
def self.derive_shine( color )
|
54
|
+
color = Color.parse( color ) if color.is_a?( String )
|
55
|
+
|
56
|
+
hsv = Color.to_hsv( color )
|
57
|
+
# pp hsv
|
58
|
+
|
59
|
+
h, s, v = hsv
|
60
|
+
h = h % 360 # make always positive (might be -50 or such)
|
61
|
+
## pp [h,s,v]
|
62
|
+
|
63
|
+
## add extra saturation if v(alue) / brightness is max 1.0 - why? why not?
|
64
|
+
sdiff = v >= 0.99 ? 0.25 : 0.15
|
65
|
+
|
66
|
+
lighter = Color.from_hsv( h, [0.0, s-sdiff].max, [v+0.1,1.0].min )
|
67
|
+
lighter
|
68
|
+
end
|
69
|
+
|
70
|
+
|
43
71
|
##
|
44
72
|
## todo/check:
|
45
73
|
## add a derive_colors or dervice_skintones method - why? why not?
|
46
74
|
## - change to name skintone_palette - why? why not?
|
47
75
|
## def self.derive_skintone_colors( color or base ) ???
|
48
76
|
|
49
|
-
|
50
77
|
def self.derive_color_map( color )
|
51
78
|
color = Color.parse( color ) if color.is_a?( String )
|
52
79
|
|
@@ -59,28 +86,16 @@ module Human ## make it a class - why? why not?
|
|
59
86
|
h = h % 360 # make always positive (might be -50 or such)
|
60
87
|
pp [h,s,l]
|
61
88
|
|
62
|
-
darker = Color.from_hsl(
|
63
|
-
h,
|
64
|
-
[0.0, s-0.05].max,
|
65
|
-
[0.14, l-0.1].max)
|
66
|
-
|
67
89
|
## sub one degree on hue on color wheel (plus +10% on lightness??)
|
68
|
-
|
69
|
-
|
90
|
+
## darker
|
91
|
+
eyebrows = Color.from_hsl(
|
92
|
+
h,
|
70
93
|
s,
|
71
94
|
[0.05, l-0.1].max)
|
72
95
|
|
73
|
-
|
74
|
-
lighter = Color.from_hsl(
|
75
|
-
(h+1) % 360,
|
76
|
-
s,
|
77
|
-
[1.0, l+0.1].min)
|
78
|
-
|
79
96
|
color_map = {
|
80
97
|
'#ead9d9' => base,
|
81
|
-
'#
|
82
|
-
'#a58d8d' => darkest,
|
83
|
-
'#c9b2b2' => darker
|
98
|
+
'#a58d8d' => eyebrows,
|
84
99
|
}
|
85
100
|
color_map
|
86
101
|
end
|
data/lib/punkmaker/mummy.rb
CHANGED
@@ -7,29 +7,34 @@ module Punk
|
|
7
7
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/mummy-female.png" )
|
8
8
|
|
9
9
|
|
10
|
-
def self.make( color,
|
10
|
+
def self.make( color=nil,
|
11
11
|
eye_color: nil,
|
12
12
|
gender: 'm' )
|
13
|
-
|
13
|
+
base = gender == 'm' ? BASE_M : BASE_F
|
14
|
+
|
15
|
+
## note: make a copy of base
|
16
|
+
punk = Image.new( base.width, base.height )
|
17
|
+
punk.compose!( base )
|
18
|
+
|
19
|
+
if color
|
20
|
+
color_map = derive_color_map( color )
|
21
|
+
punk = punk.change_colors( color_map )
|
22
|
+
end
|
14
23
|
|
15
|
-
|
24
|
+
if eye_color
|
25
|
+
eye_color = Color.parse( eye_color ) if eye_color.is_a?( String )
|
16
26
|
|
17
|
-
punk = nil
|
18
27
|
if gender == 'm'
|
19
|
-
punk = BASE_M.change_colors( color_map )
|
20
|
-
if eye_color
|
21
28
|
punk[9,12] = eye_color
|
22
29
|
punk[14,12] = eye_color
|
23
|
-
end
|
24
30
|
else ## assume 'f'
|
25
|
-
punk = BASE_F.change_colors( color_map )
|
26
|
-
if eye_color
|
27
31
|
punk[10,13] = eye_color ## note: eye pos +1 pix!!
|
28
32
|
punk[14,13] = eye_color
|
29
|
-
end
|
30
33
|
end
|
31
|
-
punk
|
32
34
|
end
|
35
|
+
punk
|
36
|
+
end
|
37
|
+
|
33
38
|
|
34
39
|
def self.derive_color_map( color )
|
35
40
|
color = Color.parse( color ) if color.is_a?( String )
|
data/lib/punkmaker/orc.rb
CHANGED
@@ -6,17 +6,20 @@ module Orc ## make it a class - why? why not?
|
|
6
6
|
BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/orc-male.png" )
|
7
7
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/orc-female.png" )
|
8
8
|
|
9
|
-
def self.make( color,
|
9
|
+
def self.make( color=nil,
|
10
10
|
gender: 'm' )
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
punk
|
11
|
+
base = gender == 'm' ? BASE_M : BASE_F
|
12
|
+
|
13
|
+
## note: make a copy of base
|
14
|
+
punk = Image.new( base.width, base.height )
|
15
|
+
punk.compose!( base )
|
16
|
+
|
17
|
+
if color
|
18
|
+
color_map = derive_color_map( color )
|
19
|
+
punk = punk.change_colors( color_map )
|
20
|
+
end
|
21
|
+
|
22
|
+
punk
|
20
23
|
end
|
21
24
|
|
22
25
|
def self.derive_color_map( color )
|
data/lib/punkmaker/robot.rb
CHANGED
@@ -6,17 +6,20 @@ module Robot ## make it a class - why? why not?
|
|
6
6
|
BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/robot-male.png" )
|
7
7
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/robot-female.png" )
|
8
8
|
|
9
|
-
def self.make( color,
|
9
|
+
def self.make( color=nil,
|
10
10
|
gender: 'm' )
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
punk
|
11
|
+
base = gender == 'm' ? BASE_M : BASE_F
|
12
|
+
|
13
|
+
## note: make a copy of base
|
14
|
+
punk = Image.new( base.width, base.height )
|
15
|
+
punk.compose!( base )
|
16
|
+
|
17
|
+
if color
|
18
|
+
color_map = derive_color_map( color )
|
19
|
+
punk = punk.change_colors( color_map )
|
20
|
+
end
|
21
|
+
|
22
|
+
punk
|
20
23
|
end
|
21
24
|
|
22
25
|
def self.derive_color_map( color )
|
data/lib/punkmaker/skeleton.rb
CHANGED
@@ -5,17 +5,20 @@ module Skeleton ## make it a class - why? why not?
|
|
5
5
|
BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/skeleton-male.png" )
|
6
6
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/skeleton-female.png" )
|
7
7
|
|
8
|
-
def self.make( color,
|
8
|
+
def self.make( color=nil,
|
9
9
|
gender: 'm' )
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
punk
|
10
|
+
base = gender == 'm' ? BASE_M : BASE_F
|
11
|
+
|
12
|
+
## note: make a copy of base
|
13
|
+
punk = Image.new( base.width, base.height )
|
14
|
+
punk.compose!( base )
|
15
|
+
|
16
|
+
if color
|
17
|
+
color_map = derive_color_map( color )
|
18
|
+
punk = punk.change_colors( color_map )
|
19
|
+
end
|
20
|
+
|
21
|
+
punk
|
19
22
|
end
|
20
23
|
|
21
24
|
def self.derive_color_map( color )
|
data/lib/punkmaker/vampire.rb
CHANGED
@@ -6,17 +6,20 @@ module Vampire ## make it a class - why? why not?
|
|
6
6
|
BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/vampire-male.png" )
|
7
7
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/vampire-female.png" )
|
8
8
|
|
9
|
-
def self.make( color,
|
9
|
+
def self.make( color=nil,
|
10
10
|
gender: 'm' )
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
punk
|
11
|
+
base = gender == 'm' ? BASE_M : BASE_F
|
12
|
+
|
13
|
+
## note: make a copy of base
|
14
|
+
punk = Image.new( base.width, base.height )
|
15
|
+
punk.compose!( base )
|
16
|
+
|
17
|
+
if color
|
18
|
+
color_map = derive_color_map( color )
|
19
|
+
punk = punk.change_colors( color_map )
|
20
|
+
end
|
21
|
+
|
22
|
+
punk
|
20
23
|
end
|
21
24
|
|
22
25
|
def self.derive_color_map( color )
|
data/lib/punkmaker/version.rb
CHANGED
data/lib/punkmaker/zombie.rb
CHANGED
@@ -6,18 +6,58 @@ module Zombie ## make it a class - why? why not?
|
|
6
6
|
BASE_M = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/zombie-male.png" )
|
7
7
|
BASE_F = Image.read( "#{Pixelart::Module::Punkmaker.root}/config/zombie-female.png" )
|
8
8
|
|
9
|
-
def self.make( color,
|
9
|
+
def self.make( color=nil,
|
10
|
+
shine: true,
|
10
11
|
gender: 'm' )
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
+
|
18
|
+
if color
|
19
|
+
color_map = derive_color_map( color )
|
20
|
+
punk = punk.change_colors( color_map )
|
21
|
+
end
|
22
|
+
|
23
|
+
if shine
|
24
|
+
shine_color = color ? derive_shine( color ) : 0x9bbc88ff
|
14
25
|
if gender == 'm'
|
15
|
-
|
16
|
-
|
17
|
-
|
26
|
+
punk[9,7] = shine_color
|
27
|
+
punk[8,8] = shine_color
|
28
|
+
else
|
29
|
+
punk[9,9] = shine_color
|
18
30
|
end
|
19
|
-
|
31
|
+
end
|
32
|
+
|
33
|
+
punk
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
def self.derive_shine( color )
|
38
|
+
## was before - reuse - why? why not?
|
39
|
+
## todo/check - check "formula" used in skintones script for humans!!!
|
40
|
+
## lighter = Color.from_hsl(
|
41
|
+
## (h+1)%360, # todo/check: make lighter by -1 on hue? or +1????
|
42
|
+
## [1.0,s+0.10].min,
|
43
|
+
## [1.0,l+0.25].min)
|
44
|
+
|
45
|
+
color = Color.parse( color ) if color.is_a?( String )
|
46
|
+
|
47
|
+
hsv = Color.to_hsv( color )
|
48
|
+
# pp hsv
|
49
|
+
|
50
|
+
h, s, v = hsv
|
51
|
+
h = h % 360 # make always positive (might be -50 or such)
|
52
|
+
## pp [h,s,v]
|
53
|
+
|
54
|
+
## add extra saturation if v(alue) / brightness is max 1.0 - why? why not?
|
55
|
+
sdiff = v >= 0.99 ? 0.25 : 0.15
|
56
|
+
|
57
|
+
lighter = Color.from_hsv( h, [0.0, s-sdiff].max, [v+0.1,1.0].min )
|
58
|
+
lighter
|
20
59
|
end
|
60
|
+
|
21
61
|
|
22
62
|
def self.derive_color_map( color )
|
23
63
|
color = Color.parse( color ) if color.is_a?( String )
|
@@ -40,17 +80,10 @@ module Zombie ## make it a class - why? why not?
|
|
40
80
|
[0.0,s-0.05].max,
|
41
81
|
[0.0,l-0.12].max)
|
42
82
|
|
43
|
-
## todo/check - check "formula" used in skintones script for humans!!!
|
44
|
-
lighter = Color.from_hsl(
|
45
|
-
(h+1)%360, # todo/check: make lighter by -1 on hue? or +1????
|
46
|
-
[1.0,s+0.10].min,
|
47
|
-
[1.0,l+0.25].min)
|
48
|
-
|
49
83
|
|
50
84
|
color_map = {
|
51
85
|
'#7da269' => base,
|
52
86
|
'#5e7253' => darker,
|
53
|
-
'#9bbc88' => lighter
|
54
87
|
}
|
55
88
|
|
56
89
|
color_map
|
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.
|
4
|
+
version: 0.3.1
|
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-
|
11
|
+
date: 2023-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pixelart
|