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

Class RGBA

source code

  object --+            
           |            
paint.IPaint --+        
               |        
           Color --+    
                   |    
                 RGB --+
                       |
                      RGBA

Represents RGBA color value.

@author Invient


Author: Richard Lincoln

Instance Methods [hide private]
 
__init__(self, red, green, blue, alpha)
Creates an RGBA color with the specified red, green, blue and alpha values.
source code
 
getAlpha(self)
Returns: Returns the alpha component in the range (0.0-1.0).
source code
 
getString(self)
Returns: Returns string representation of this RGBA
source code
 
__str__(self)
Returns: Returns string representation of this RGBA
source code

Inherited from RGB: getBlue, getGreen, getRed

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, alpha)
(Constructor)

source code 

Creates an RGBA color with the specified red, green, blue and alpha values. The red, green and blue values must be in the range (0 - 255). The alpha value must be in the range (0.0-1.0). The alpha value deaults to 1.0

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

getAlpha(self)

source code 
Returns:
Returns the alpha component in the range (0.0-1.0).

getString(self)

source code 

Returns string representation of an object of type Paint.

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

__str__(self)
(Informal representation operator)

source code 

str(x)

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