Material:getColor

Returns a color property for a Material. Different types of colors are supported for different lighting parameters. Colors default to white and are gamma corrected as necessary, see lovr.graphics.isGammaCorrect for more info on that.

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