class RubyXL::Color

www.datypic.com/sc/ooxml/e-ssml_color-4.html

Constants

COLOR_REGEXP

Public Class Methods

validate_color(color) click to toggle source

validates hex color code, no '#' allowed

# File lib/rubyXL/objects/color.rb, line 17
def self.validate_color(color)
  if color =~ COLOR_REGEXP
    return true
  else
    raise 'invalid color'
  end
end