Method: Punk::Human.parse_skintone

Defined in:
lib/punkmaker/type/human.rb

.parse_skintone(color) ⇒ Object

lookup skintone by name or rgb(a) hex string or integer “true color”



12
13
14
15
16
17
18
# File 'lib/punkmaker/type/human.rb', line 12

def self.parse_skintone( color )   ##  lookup skintone by name or rgb(a) hex string or integer "true color"
  if color.is_a?( String ) 
     Skintone[ color ] || Color.from_hex( color )  
  else ## assume color is integer - assert - why? why not?
     color
  end
end