Class: ASEPalette::Color::CMYK

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, c, m, y, k, type = DEFAULT_COLOR_TYPE) ⇒ CMYK

Returns a new instance of CMYK.



50
51
52
53
54
55
56
57
# File 'lib/ase-palette/color.rb', line 50

def initialize(name, c, m, y, k, type = DEFAULT_COLOR_TYPE)
  @name = name
  @c = c
  @m = m
  @y = y
  @k = k
  @type = type
end

Instance Attribute Details

#cObject

Returns the value of attribute c.



49
50
51
# File 'lib/ase-palette/color.rb', line 49

def c
  @c
end

#kObject

Returns the value of attribute k.



49
50
51
# File 'lib/ase-palette/color.rb', line 49

def k
  @k
end

#mObject

Returns the value of attribute m.



49
50
51
# File 'lib/ase-palette/color.rb', line 49

def m
  @m
end

#yObject

Returns the value of attribute y.



49
50
51
# File 'lib/ase-palette/color.rb', line 49

def y
  @y
end

Instance Method Details

#dataObject



58
59
60
# File 'lib/ase-palette/color.rb', line 58

def data
  { c: @c, m: @m, y: @y, k: @k }
end