Class RGhost::RGB
In: color.rb
Parent: RGhost::Color

Creates RGB color

Methods

new   ps  

Constants

CONSTANTS = RGhost::Constants::Colors::RGB
DEFAULT_RGB = {:red => 0, :green => 0, :blue => 0}

Attributes

blue  [RW] 
green  [RW] 
red  [RW] 

Public Class methods

String HTML color converter

 Color.create '#FFAA33'

As Symbol will be find in RGhost::Constants::Colors::RGB

 Color.create :red

As Array with 3 elements

 Color.create [0.5, 0.3, 0.5]

Hash with 3 pair of key/value. Valids keys :red, :green and :blue

 Color.create :red => 0.5, :green => 0.3, :blue => 0.5

Hash with 3 pair of key/value. Valids keys :r, :g and :b

 Color.create :r => 0.5, :g => 0.3, :b => 0.5

Public Instance methods

[Validate]