Package muntjac :: Package addon :: Package invient :: Module color :: Class RGB
[hide private]
[frames] | no frames]

Class RGB

source code

  object --+        
           |        
paint.IPaint --+    
               |    
           Color --+
                   |
                  RGB
Known Subclasses:

Represents RBG color value.


Authors:
Invient, Richard Lincoln
Instance Methods [hide private]
 
__init__(self, red, green, blue)
Creates an RGB color with the specified red, green, and blue values.
source code
 
getRed(self)
Returns: Returns the red component in the range (0-255).
source code
 
getGreen(self)
Returns: Returns the green component in the range (0-255).
source code
 
getBlue(self)
Returns: Returns the blue component in the range (0-255).
source code
 
getString(self)
Returns: Returns string representation of this RBG.
source code
 
__str__(self)
Returns: Returns string representation of this RBG.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, red, green, blue)
(Constructor)

source code 

Creates an RGB color with the specified red, green, and blue values. The values must be in the range (0 - 255).

Parameters:
  • red - the red component in a color
  • green - the green component in a color
  • blue - the blue component in a color
Overrides: object.__init__

getRed(self)

source code 
Returns:
Returns the red component in the range (0-255).

getGreen(self)

source code 
Returns:
Returns the green component in the range (0-255).

getBlue(self)

source code 
Returns:
Returns the blue component in the range (0-255).

getString(self)

source code 

Returns string representation of an object of type Paint.

Returns:
Returns string representation of this RBG.
Overrides: paint.IPaint.getString

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns:
Returns string representation of this RBG.
Overrides: object.__str__