Sha256: d47b53f939fdc21f3f112b4169066df4151f80a95bcc642e50acf61d95ea37be

Contents?: true

Size: 226 Bytes

Versions: 36

Compression:

Stored size: 226 Bytes

Contents

module RubyXL
class Color

  #validates hex color code, no '#' allowed
  def Color.validate_color(color)
    if color =~ /^([a-f]|[A-F]|[0-9]){6}$/
      return true
    else
      raise 'invalid color'
    end
  end

end
end

Version data entries

36 entries across 36 versions & 3 rubygems

Version Path
rubyXL-1.1.7 lib/rubyXL/color.rb
rubyXL-1.1.6 lib/rubyXL/color.rb
rubyXL-1.1.5 lib/rubyXL/color.rb
rubyXL-1.1.4 lib/color.rb
rubyXL-1.1.3 lib/color.rb
rubyXL-1.1.2 lib/color.rb
rubyXL-1.1.1 lib/color.rb
rubyXL-1.1.0 lib/color.rb
rubyXL-1.0.11 lib/color.rb
rubyXL-1.0.10 lib/color.rb
rubyXL-1.0.9 lib/color.rb
rubyXL-1.0.8 lib/color.rb
rubyXL-1.0.7 lib/color.rb
rubyXL-1.0.6 lib/color.rb
rubyXL-1.0.5 lib/color.rb
rubyXL-1.0.4 lib/color.rb