Class Color
The Color class provides methods for manipulating colors.
Constructor Attributes | Constructor Name and Description |
---|---|
Color(r, g, b, a)
Constructor.
|
Method Attributes | Method Name and Description |
---|---|
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.
|
|
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.