Color
Description
A very simple Color class. Also has helpful methods for converting different representations of colors.
API overview
Constructor
Color
(
r: Number
= 0
,
g: Number
= 0
,
b: Number
= 0
,
a: Number
= 255
)
Allows easy creation of colors RGBA color representations
Functions
Public functions
| fromHex ( value: String ): Color |
static Decode a color from a hex string value, ie, #FF00FF |
| fromInt ( value: Number ): Color |
static Decode a color from an integer, ie, 0xFF00FF |
| fromInteger ( value: Number ): Color |
static Decode a color from an integer, ie, 0xFF00FF |
| random (): Color |
static Returns a random color |
| toHex ( prepend: String = # ): String |
Return the color as a hex string representation, ie, #FF00FF |
| toInt (): Number |
Return the color as an integer representation, ie, 0 - 16777215 |
Constructor
Attributes
Functions
fromHex ( value: String ): Color
static
Decode a color from a hex string value, ie, #FF00FF.
Parameters
| value: String |
fromInt ( value: Number ): Color
static
Decode a color from an integer, ie, 0xFF00FF.
Parameters
| value: Number |
fromInteger ( value: Number ): Color
static
Decode a color from an integer, ie, 0xFF00FF.
Parameters
| value: Number |
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
| String | type name of the Object. |