Class: ASEPalette::Color::RGB
- Inherits:
-
ASEPalette::Color
- Object
- ASEPalette::Color
- ASEPalette::Color::RGB
- Defined in:
- lib/ase-palette/color.rb
Instance Attribute Summary collapse
-
#b ⇒ Object
Returns the value of attribute b.
-
#g ⇒ Object
Returns the value of attribute g.
-
#r ⇒ Object
Returns the value of attribute r.
Attributes inherited from ASEPalette::Color
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(name, r, g, b, type = DEFAULT_COLOR_TYPE) ⇒ RGB
constructor
A new instance of RGB.
Methods inherited from ASEPalette::Color
Constructor Details
#initialize(name, r, g, b, type = DEFAULT_COLOR_TYPE) ⇒ RGB
Returns a new instance of RGB.
36 37 38 39 40 41 42 |
# File 'lib/ase-palette/color.rb', line 36 def initialize(name, r, g, b, type = DEFAULT_COLOR_TYPE) @name = name @r = r @g = g @b = b @type = type end |
Instance Attribute Details
#b ⇒ Object
Returns the value of attribute b.
35 36 37 |
# File 'lib/ase-palette/color.rb', line 35 def b @b end |
#g ⇒ Object
Returns the value of attribute g.
35 36 37 |
# File 'lib/ase-palette/color.rb', line 35 def g @g end |
#r ⇒ Object
Returns the value of attribute r.
35 36 37 |
# File 'lib/ase-palette/color.rb', line 35 def r @r end |
Instance Method Details
#data ⇒ Object
43 44 45 |
# File 'lib/ase-palette/color.rb', line 43 def data { r: @r, g: @g, b: @b } end |