class Axlsx::Color

The color class represents a color used for borders, fills an fonts

Creates a new Color object


  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • auto (Boolean)
  • rgb (String)
  • tint (Float)

Determines if the color is system color dependant


rgb colors need to conform to ST_UnsignedIntHex. That basically means put 'FF' before you color

The color as defined in rgb terms. When assigning the rgb value the behavior is much like CSS selectors and can use shorthand versions as follows: If you provide a two character value it will be repeated for each r, g, b assignment If you provide data that is not 2 characters in length, and is less than 8 characters it will be padded with “F”

Examples: :rgb => "FF000000"
  => #<Axlsx::Color:0x102106b68 @rgb="FF000000"> :rgb => "0A"
  => #<Axlsx::Color:0x102106b68 @rgb="FF0A0A0A"> :rgb => "00BB"
  => #<Axlsx::Color:0x102106b68 @rgb="FFFF00BB">

valid values are between -1.0 and 1.0

The tint value.

Serializes the object


  • str (String) (defaults to: '')

Color is referenced in 0 repositories