Color Class Reference
| Inherits from | JavaScript Object |
| Location | aphid.core.Color |
Overview
Represents a color with red, green, blue and alpha components.
Color is a special data type for attributes and parameters in OpenAphid. Besides an instance of the Color class, string and int values are also valid for attributes and parameters, which are declared to be the type of Color.
For example, the statements below are all valid to set red color to a Sprite.
sprite.color = new Color(255, 0, 0);
sprite.color = "red";
sprite.color = 0xff0000; //RGB color
Please refer to the W3C document of Extended color keywords to get the list of valid color names.
Overview of Tasks
Attributes
- Type
-
int -
int -
int -
int
- Writability
-
readonly -
readonly -
readonly -
readonly
Functions
- Signature
-
toString()
- Return Type
-
string