# File lib/maruku/output/to_latex.rb, line 162
  def latex_color(s, command='color')
    if s =~ /\A\#([1-9A-F]{1,2})([1-9A-F]{1,2})([1-9A-F]{1,2})\z/i
      # convert from 0-255 or 0-15 to 0.0-1.0
      r, g, b = [$1, $2, $3].map {|c| c.hex / (c.length == 1 ? 15.0 : 255.0) }
      "\\#{command}[rgb]{%0.2f,%0.2f,%0.2f}" % [r, g, b]
    else
      "\\#{command}{#{s}}"
    end
  end