Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed May 17, 2021
1 parent 4880290 commit 819f6a8
Show file tree
Hide file tree
Showing 60 changed files with 205 additions and 3 deletions.
143 changes: 141 additions & 2 deletions 10_hair.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ hair_colors.each do |hair_color_name, hair_color|
punkette.compose!( hair )

name = "#{skin_tone_name}_side_#{hair_color_name}"
punkette.save( "./i/punkette_#{name}.png" )
punkette.zoom(4).save( "./i/punkette_#{name}x4.png" )
punkette.save( "punkette_#{name}.png" )
punkette.zoom(4).save( "punkette_#{name}x4.png" )
end
end
```
Expand Down Expand Up @@ -265,3 +265,142 @@ Voila!




What's trendy in 2021?
Let's try out some hair dos.

``` ruby
wildhair_design = <<TXT
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . @ @ @ @ . @ . . . . . . . .
. . . . . . . @ . @ @ @ @ @ @ . . . . . . . . .
. . . . . . . @ @ @ @ @ @ @ @ @ . @ . . . . . .
. . . . . @ @ @ @ @ @ @ @ @ @ @ @ . @ . . . . .
. . . . . . @ @ @ @ . @ @ @ @ @ @ @ @ . . . . .
. . . . . @ @ @ @ . @ . @ . . @ @ @ . . . . . .
. . . . @ . @ @ @ . . . @ . . . @ @ @ . . . . .
. . . . . @ @ @ . . . . @ . . . . @ . @ . . . .
. . . . @ . @ . . . . . . @ . . . @ @ . . . . .
. . . @ @ @ @ . . . . . . . . . . @ @ . . . . .
. . . . . @ @ . . . . . . . . . . @ @ @ . . . .
. . . . . @ @ . . . . . . . . . . @ . . . . . .
. . . . @ . . . . . . . . . . . . . @ . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
TXT


wildhair = Image.parse( wildhair_design, colors: [BLACK] )
wildhair.save( 'wildhair_black.png' )
wildhair.zoom(4).save('wildhair_blackx4.png')
```

![](i/wildhair_black.png)
![](i/wildhair_blackx4.png)



and let's adjusting the hair stylist loop on more time:

``` ruby
hair_styles = {
'side' => sidehair_design,
'wild' => wildhair_design,
}

hair_styles.each do |hair_style_name, hair_style|
hair_colors.each do |hair_color_name, hair_color|
hair = Image.parse( hair_style, colors: [hair_color] )

skin_tones.each do |skin_tone_name, skin_tone_colors|
punkette = Image.parse( punkette_design, colors: skin_tone_colors )

punkette.compose!( hair )

name = "#{skin_tone_name}_#{hair_style_name}_#{hair_color_name}"
punkette.save( "punkette_#{name}.png" )
punkette.zoom(4).save( "punkette_#{name}x4.png" )
end
end
end
```

Voila!


![](i/punkette_lighter_wild_black.png)
![](i/punkette_lighter_wild_brunette.png)
![](i/punkette_lighter_wild_red.png)
![](i/punkette_lighter_wild_orange.png)
![](i/punkette_lighter_wild_green.png)
![](i/punkette_lighter_wild_blonde.png)
![](i/punkette_lighter_wild_whitesmoke.png)

![](i/punkette_light_wild_black.png)
![](i/punkette_light_wild_brunette.png)
![](i/punkette_light_wild_red.png)
![](i/punkette_light_wild_orange.png)
![](i/punkette_light_wild_green.png)
![](i/punkette_light_wild_blonde.png)
![](i/punkette_light_wild_whitesmoke.png)

![](i/punkette_dark_wild_black.png)
![](i/punkette_dark_wild_brunette.png)
![](i/punkette_dark_wild_red.png)
![](i/punkette_dark_wild_orange.png)
![](i/punkette_dark_wild_green.png)
![](i/punkette_dark_wild_blonde.png)
![](i/punkette_dark_wild_whitesmoke.png)

![](i/punkette_darker_wild_black.png)
![](i/punkette_darker_wild_brunette.png)
![](i/punkette_darker_wild_red.png)
![](i/punkette_darker_wild_orange.png)
![](i/punkette_darker_wild_green.png)
![](i/punkette_darker_wild_blonde.png)
![](i/punkette_darker_wild_whitesmoke.png)

4x

![](i/punkette_lighter_wild_blackx4.png)
![](i/punkette_lighter_wild_brunettex4.png)
![](i/punkette_lighter_wild_redx4.png)
![](i/punkette_lighter_wild_orangex4.png)
![](i/punkette_lighter_wild_greenx4.png)
![](i/punkette_lighter_wild_blondex4.png)
![](i/punkette_lighter_wild_whitesmokex4.png)

![](i/punkette_light_wild_blackx4.png)
![](i/punkette_light_wild_brunettex4.png)
![](i/punkette_light_wild_redx4.png)
![](i/punkette_light_wild_orangex4.png)
![](i/punkette_light_wild_greenx4.png)
![](i/punkette_light_wild_blondex4.png)
![](i/punkette_light_wild_whitesmokex4.png)

![](i/punkette_dark_wild_blackx4.png)
![](i/punkette_dark_wild_brunettex4.png)
![](i/punkette_dark_wild_redx4.png)
![](i/punkette_dark_wild_orangex4.png)
![](i/punkette_dark_wild_greenx4.png)
![](i/punkette_dark_wild_blondex4.png)
![](i/punkette_dark_wild_whitesmokex4.png)

![](i/punkette_darker_wild_blackx4.png)
![](i/punkette_darker_wild_brunettex4.png)
![](i/punkette_darker_wild_redx4.png)
![](i/punkette_darker_wild_orangex4.png)
![](i/punkette_darker_wild_greenx4.png)
![](i/punkette_darker_wild_blondex4.png)
![](i/punkette_darker_wild_whitesmokex4.png)



65 changes: 64 additions & 1 deletion hair.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,67 @@



puts "bye"
wildhair_design = <<TXT
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . @ @ @ @ . @ . . . . . . . .
. . . . . . . @ . @ @ @ @ @ @ . . . . . . . . .
. . . . . . . @ @ @ @ @ @ @ @ @ . @ . . . . . .
. . . . . @ @ @ @ @ @ @ @ @ @ @ @ . @ . . . . .
. . . . . . @ @ @ @ . @ @ @ @ @ @ @ @ . . . . .
. . . . . @ @ @ @ . @ . @ . . @ @ @ . . . . . .
. . . . @ . @ @ @ . . . @ . . . @ @ @ . . . . .
. . . . . @ @ @ . . . . @ . . . . @ . @ . . . .
. . . . @ . @ . . . . . . @ . . . @ @ . . . . .
. . . @ @ @ @ . . . . . . . . . . @ @ . . . . .
. . . . . @ @ . . . . . . . . . . @ @ @ . . . .
. . . . . @ @ . . . . . . . . . . @ . . . . . .
. . . . @ . . . . . . . . . . . . . @ . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
TXT


wildhair = Image.parse( wildhair_design, colors: [BLACK] )
wildhair.save( './i/wildhair_black.png' )
wildhair.zoom(4).save('./i/wildhair_blackx4.png')








hair_styles = {
'side' => sidehair_design,
'wild' => wildhair_design,
}

hair_styles.each do |hair_style_name, hair_style|
hair_colors.each do |hair_color_name, hair_color|
hair = Image.parse( hair_style, colors: [hair_color] )

skin_tones.each do |skin_tone_name, skin_tone_colors|
punkette = Image.parse( punkette_design, colors: skin_tone_colors )

punkette.compose!( hair )

name = "#{skin_tone_name}_#{hair_style_name}_#{hair_color_name}"
punkette.save( "./i/punkette_#{name}.png" )
punkette.zoom(4).save( "./i/punkette_#{name}x4.png" )
end
end
end


puts "bye"


Binary file added i/punkette_dark_wild_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_blackx4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_blonde.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_blondex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_brunette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_brunettex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_greenx4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_orangex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_redx4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_whitesmoke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_dark_wild_whitesmokex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_blackx4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_blonde.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_blondex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_brunette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_brunettex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_greenx4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_orangex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added i/punkette_darker_wild_redx4.png
Binary file added i/punkette_darker_wild_whitesmoke.png
Binary file added i/punkette_darker_wild_whitesmokex4.png
Binary file added i/punkette_light_wild_black.png
Binary file added i/punkette_light_wild_blackx4.png
Binary file added i/punkette_light_wild_blonde.png
Binary file added i/punkette_light_wild_blondex4.png
Binary file added i/punkette_light_wild_brunette.png
Binary file added i/punkette_light_wild_brunettex4.png
Binary file added i/punkette_light_wild_green.png
Binary file added i/punkette_light_wild_greenx4.png
Binary file added i/punkette_light_wild_orange.png
Binary file added i/punkette_light_wild_orangex4.png
Binary file added i/punkette_light_wild_red.png
Binary file added i/punkette_light_wild_redx4.png
Binary file added i/punkette_light_wild_whitesmoke.png
Binary file added i/punkette_light_wild_whitesmokex4.png
Binary file added i/punkette_lighter_wild_black.png
Binary file added i/punkette_lighter_wild_blackx4.png
Binary file added i/punkette_lighter_wild_blonde.png
Binary file added i/punkette_lighter_wild_blondex4.png
Binary file added i/punkette_lighter_wild_brunette.png
Binary file added i/punkette_lighter_wild_brunettex4.png
Binary file added i/punkette_lighter_wild_green.png
Binary file added i/punkette_lighter_wild_greenx4.png
Binary file added i/punkette_lighter_wild_orange.png
Binary file added i/punkette_lighter_wild_orangex4.png
Binary file added i/punkette_lighter_wild_red.png
Binary file added i/punkette_lighter_wild_redx4.png
Binary file added i/punkette_lighter_wild_whitesmoke.png
Binary file added i/punkette_lighter_wild_whitesmokex4.png
Binary file added i/wildhair_black.png
Binary file added i/wildhair_blackx4.png

0 comments on commit 819f6a8

Please sign in to comment.