Class List

Class Color

The Color class provides methods for manipulating colors.

Class Summary
Constructor Attributes Constructor Name and Description
 
Color(r, g, b, a)
Constructor.
Method Summary
Method Attributes Method Name and Description
 
Returns the HEX string currently in use by the color object.
 
Returns the R+G+B combination currently in use by the color object.
 
Returns the R+G+B+A combination currently in use by the color object.
 
toBlackWhite(threshold)
Converts the color to black and white mode.
 
Converts the color to grayscale mode.
Class Detail
Color(r, g, b, a)
Constructor.
Parameters:
r
red 0-255
g
green 0-255
b
blue 0-255
a
alpha 0-1
Method Detail
getHEX()
Returns the HEX string currently in use by the color object.

getRGB()
Returns the R+G+B combination currently in use by the color object.

getRGBA()
Returns the R+G+B+A combination currently in use by the color object.

toBlackWhite(threshold)
Converts the color to black and white mode.
Parameters:
threshold

toGrayscale()
Converts the color to grayscale mode.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 25 2011 15:02:39 GMT+0800 (CST)