Beta Documentation - Subject to change.

Initializes a new color from a, r, g, b components.

Syntax

Lua
function Color:Color(a, r, g, b);

Parameters

a
Type: number
The alpha component.
r
Type: number
The red component.
g
Type: number
The green component.
b
Type: number
The blue component.

Remarks

Initializes a new color from the specified color components. The color components should all be number values in the range of 0.0 to 1.0.

Examples

Creates a new color.
Creating a ColorCopy Code
        -- Creates a new color that is a semitransparent blue.
        local color = Turbine.UI.Color( 0.5, 0.0, 0.0, 1.0 );

See Also