class RubyXL::Color
Public Class Methods
validate_color(color)
click to toggle source
validates hex color code, no ‘#’ allowed
# File lib/rubyXL/objects/color.rb, line 15 def self.validate_color(color) if color =~ /\A([a-f]|[A-F]|[0-9]){6}\Z/ return true else raise 'invalid color' end end