Method: RBPDF#convert_html_color_to_dec_array

Defined in:
lib/rbpdf.rb

#convert_html_color_to_dec_array(color = "#FFFFFF") ⇒ Object

Returns an associative array (keys: R,G,B) from an html color name or a six-digit or three-digit hexadecimal color representation (i.e. #3FE5AA or #7FF).

@param string :color

html color

@return array

RGB color or empty array in case of error.

@access public


8659
8660
8661
8662
8663
8664
8665
8666
# File 'lib/rbpdf.rb', line 8659

def convert_html_color_to_dec_array(color = "#FFFFFF")
  returncolor = _convert_html_color_to_dec(color)
  if returncolor.is_a? Hash
    returncolor.values
  else
    returncolor
  end
end