Class: ASEPalette::Color::LAB

Inherits:
ASEPalette::Color show all
Defined in:
lib/ase-palette/color.rb

Instance Attribute Summary collapse

Attributes inherited from ASEPalette::Color

#name, #type

Instance Method Summary collapse

Methods inherited from ASEPalette::Color

#model, #to_h, #to_s

Constructor Details

#initialize(name, l, a, b, type = DEFAULT_COLOR_TYPE) ⇒ LAB

Returns a new instance of LAB.



65
66
67
68
69
70
71
# File 'lib/ase-palette/color.rb', line 65

def initialize(name, l, a, b, type = DEFAULT_COLOR_TYPE)
  @name = name
  @l = l
  @a = a
  @b = b
  @type = type
end

Instance Attribute Details

#aObject

Returns the value of attribute a.



64
65
66
# File 'lib/ase-palette/color.rb', line 64

def a
  @a
end

#bObject

Returns the value of attribute b.



64
65
66
# File 'lib/ase-palette/color.rb', line 64

def b
  @b
end

#lObject

Returns the value of attribute l.



64
65
66
# File 'lib/ase-palette/color.rb', line 64

def l
  @l
end

Instance Method Details

#dataObject



72
73
74
# File 'lib/ase-palette/color.rb', line 72

def data
  { l: @l, a: @a, b: @b }
end