Color
-
Color inherits Object
Construction: Color newObj = Color();
Clone: Color newObj = Color(other);
Color is the utility scripting class to represent colors. Colors are represented as a set of Red, Green, Blue, Alpha (RGBA) integer values ranging from [0, 255]. A default constructed Color represents black with the values (0, 0, 0, 255).
Static Methods
-
static Color Construct(int aRed, int aGreen, int aBlue)
-
static Color Construct(int aRed, int aGreen, int aBlue, int aAlpha)
Creates a Color with the given RGB and alpha values. If no alpha is specified, 255 is used.
-
static Color Construct(string aHex)
Creates a Color with the given hex value.
-
static Color Black()
Returns a Color with values (0, 0, 0, 255).
-
static Color Blue()
Returns a Color with values (0, 168, 220, 255).
-
static Color Brown()
Returns a Color with values (61, 33, 0, 255).
-
static Color DarkBlue()
Returns a Color with values (0, 107, 140, 255).
-
static Color DarkGreen()
Returns a Color with values (0, 160, 0, 255).
-
static Color DarkPurple()
Returns a Color with values (80, 0, 80, 255).
-
static Color DarkRed()
Returns a Color with values (200, 0, 0, 255).
-
static Color DarkYellow()
Returns a Color with values (225, 220, 0, 255).
-
static Color Green()
Returns a Color with values (0, 226, 0, 255).
-
static Color Indigo()
Returns a Color with values (74, 0, 159, 255).
-
static Color LightBlue()
Returns a Color with values (128, 224, 255, 255).
-
static Color LightGreen()
Returns a Color with values (170, 255, 170, 255).
-
static Color LightPurple()
Returns a Color with values (255, 161, 255, 255).
-
static Color LightRed()
Returns a Color with values (255, 128, 128, 255).
-
static Color LightYellow()
Returns a Color with values (255, 255, 128, 255).
-
static Color Magenta()
Returns a Color with values (255, 0, 255, 255).
-
static Color Orange()
Returns a Color with values (255, 170, 0, 255).
-
static Color Pink()
Returns a Color with values (255, 0, 192, 255).
-
static Color Purple()
Returns a Color with values (128, 0, 128, 255).
-
static Color Red()
Returns a Color with values (255, 48, 49, 255).
-
static Color Tan()
Returns a Color with values (182, 133, 56, 255).
-
static Color Violet()
Returns a Color with values (192, 128, 255, 255).
-
static Color White()
Returns a Color with values (255, 255, 255, 255).
-
static Color Yellow()
Returns a Color with values (255, 255, 0, 255).
Methods
-
int GetAlpha()
-
int GetBlue()
-
int GetGreen()
-
int GetRed()
Returns the [0, 255] value of the desired color component or alpha.
-
string GetHexString()
Returns the Color’s hex value.
-
string GetRGBA_String()
Returns the Color’s RGBA value in the following format:
where each component is in the range [0, 255].
-
void Set(int aRed, int aGreen, int aBlue)
Sets the Color to the desired RGB values.
-
void Set(Color aColor)
Sets the Color to the same values as aColor.
-
void SetAlpha(int aAlpha)
Sets the Color’s alpha value.