Method: Colir#hexa

Defined in:
lib/colir.rb

#hexaInteger

Returns the HEXA representation of the Colir.

Returns:

  • (Integer)

    the HEXA representation of the Colir



226
227
228
229
230
# File 'lib/colir.rb', line 226

def hexa
  hex = @hex.to_s(16).rjust(6, '0')
  alpha = (transparency * 100).to_i.to_s(16).rjust(2, '0')
  (hex + alpha).to_i(16)
end