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
Name | Type | Default | Description |
colorType | MaterialColor | 'diffuse' | The type of color to get.
|
Returns
Name | Type | Description |
r | number | The red component of the color.
|
g | number | The green component of the color.
|
b | number | The blue component of the color.
|
a | number | The alpha component of the color.
|
See also
MaterialColor
lovr.graphics.setColor
Material:setColor
Material