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

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

### Methods

inspect new new_from_rgba new_from_sdl_rgba to_rgba_ary to_s to_sdl_rgba_ary

### Included Modules

ColorBase

### Attributes

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

### Public Class methods

new( [r,g,b,a] ) → ColorRGB
new( [r,g,b] ) → ColorRGB
new( color ) → ColorRGB

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.

new_from_rgba( rgba )
new_from_sdl_rgba( rgba )

### Public Instance methods

inspect()

Alias for to_s

to_rgba_ary()
to_s()
to_sdl_rgba_ary()

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

[Validate]