Class: Rszr::Color::Base
- Inherits:
-
Object
- Object
- Rszr::Color::Base
- Defined in:
- lib/rszr/color/base.rb
Instance Attribute Summary collapse
-
#alpha ⇒ Object
readonly
Returns the value of attribute alpha.
Instance Method Summary collapse
Instance Attribute Details
#alpha ⇒ Object (readonly)
Returns the value of attribute alpha.
5 6 7 |
# File 'lib/rszr/color/base.rb', line 5 def alpha @alpha end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 |
# File 'lib/rszr/color/base.rb', line 15 def ==(other) other.is_a?(Base) && rgba == other.rgba end |
#cmya ⇒ Object
11 12 13 |
# File 'lib/rszr/color/base.rb', line 11 def cmya [cyan, magenta, yellow, alpha] end |
#rgba ⇒ Object
7 8 9 |
# File 'lib/rszr/color/base.rb', line 7 def rgba [red, green, blue, alpha] end |
#to_fill ⇒ Object
19 20 21 |
# File 'lib/rszr/color/base.rb', line 19 def to_fill(*) Fill.new(color: self) end |