Class Rubygame::Color::ColorRGB
In: lib/rubygame/color/models/rgb.rb
lib/rubygame/color/models/rgb.rb
Parent: Object

Represents color in the RGB (Red, Green, Blue) color space.

Methods

Included Modules

ColorBase ColorBase

Attributes

a  [R] 
a  [R] 
b  [R] 
b  [R] 
g  [R] 
g  [R] 
r  [R] 
r  [R] 

Public Class methods

Create a new instance from an Array or an existing color (of any type). If the alpha (opacity) component is omitted from the array, full opacity will be used.

All color components range from 0.0 to 1.0.

Create a new instance from an Array or an existing color (of any type). If the alpha (opacity) component is omitted from the array, full opacity will be used.

All color components range from 0.0 to 1.0.

Public Instance methods

inspect()

Alias for to_s

inspect()

Alias for to_s

Converts the color to an RGBA array of integers ranging from 0 to 255, as SDL wants.

Converts the color to an RGBA array of integers ranging from 0 to 255, as SDL wants.

[Validate]