Color

Represents a RGBA color (Red, Green, Blue, Alpha)

Constructors

Color ( number red, number green, number blue, number alpha optional )

Creates a Color with given red, green, blue and (optional) alpha values.

Parameters can be between 0.0 and 1.0 or between 0 and 255.

local red = Color(255, 0, 0)
local alsoRed = Color(1.0, 0.0, 0.0)
local semiTransparentRed = Color(1.0, 0.0, 0.0, 0.5)

Functions

nil Lerp ( Color from, Color to, number ratio )

Sets this Color to the linear interpolation between two given Color at a given ratio.

nil Set ( number r, number g, number b, number a optional, boolean light optional )

Sets this Color's components to the given values.

Properties

Color's alpha component. (shortcut to Alpha)

Color's alpha component.

Color's blue component. (shortcut to Blue)

Color's blue component.

Color's green component. (shortcut to Green)

Color's green component.

Color's red component. (shortcut to Red)

Color's red component.