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)

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.