ColorMixin

Defined in, the ColorMixin interface represents a color with red, green, blue and optional alpha.

Construction

 * - Creates a new color with three or four values between 0 and 1.
 * - Creates a new color from a string of eight hexademical characters as AARRGGBB.
 * - Creates a new color with four values between 0 and 255.

Methods

 * Fundamental
 * - Returns three values between 0 and 1.
 * - Returns three or four values between 0 and 1.
 * - Returns three values between 0 and 255.
 * - Returns four values between 0 and 255.
 * - Changes the color using new values between 0 and 1, while setting alpha to nil.
 * - Changes the color and alpha using new values between 0 and 1.


 * String output
 * - Returns  followed by six hexadecimal characters representing the color (ignoring alpha).
 * - Returns an escape sequence usable in front of text to set its color (ignoring alpha).
 * - Wraps the text with  and   escape sequences (ignoring alpha).


 * Calculation
 * - Indicates if two colors have equal red, green, blue and alpha components.

Example
local color = CreateColor(1, 1, 0) print("Did someone say " .. color:WrapTextInColorCode("yellow") .. "?")  -- Did someone say yellow ?