Material:getColor

Returns a color property for a Material. Different types of colors are supported for different lighting parameters. Colors default to (1.0, 1.0, 1.0, 1.0) and are gamma corrected.

r, g, b, a = Material:getColor(colorType)

Arguments

NameTypeDefaultDescription
colorTypeMaterialColor'diffuse'The type of color to get.

Returns

NameTypeDescription
rnumberThe red component of the color.
gnumberThe green component of the color.
bnumberThe blue component of the color.
anumberThe alpha component of the color.

See also