Class: LiteRGSS::Color
Overview
Class that describes RGBA colors in integer scale (0~255)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#alpha ⇒ Integer
The alpha opacity of the color.
-
#blue ⇒ Integer
The blue component of the color.
-
#green ⇒ Integer
The green component of the color.
-
#red ⇒ Integer
The red component of the color.
Class Method Summary collapse
-
.new(red, green, blue, alpha = 255)
Create a new color.
Instance Method Summary collapse
-
#inspect ⇒ String
Convert the color to a string that can be shown to the user.
-
#set(red, green = nil, blue = nil, alpha = nil) ⇒ self
Set the color parameters.
-
#to_s ⇒ String
Convert the color to a string that can be shown to the user.
Instance Attribute Details
#alpha ⇒ Integer
Returns The alpha opacity of the color.
59 60 61 |
# File 'LiteRGSS.rb.yard.rb', line 59 def alpha @alpha end |
#blue ⇒ Integer
Returns The blue component of the color.
57 58 59 |
# File 'LiteRGSS.rb.yard.rb', line 57 def blue @blue end |
#green ⇒ Integer
Returns The green component of the color.
55 56 57 |
# File 'LiteRGSS.rb.yard.rb', line 55 def green @green end |
#red ⇒ Integer
Returns The red component of the color.
53 54 55 |
# File 'LiteRGSS.rb.yard.rb', line 53 def red @red end |
Class Method Details
.new(red, green, blue, alpha = 255)
Create a new color
65 66 67 |
# File 'LiteRGSS.rb.yard.rb', line 65 def self.new(red, green, blue, alpha = 255) end |
Instance Method Details
#inspect ⇒ String
Convert the color to a string that can be shown to the user
84 85 86 |
# File 'LiteRGSS.rb.yard.rb', line 84 def inspect end |
#set(red, green = nil, blue = nil, alpha = nil) ⇒ self
Set the color parameters
74 75 76 |
# File 'LiteRGSS.rb.yard.rb', line 74 def set(red, green = nil, blue = nil, alpha = nil) end |
#to_s ⇒ String
Convert the color to a string that can be shown to the user
79 80 81 |
# File 'LiteRGSS.rb.yard.rb', line 79 def to_s end |