Layer:getColor
EditReturns the color of the layer. This will tint the contents of its texture. It can be used to fade the layer without re-rendering its texture, which is especially useful for layers created with the static
option.
r, g, b, a = Layer:getColor()
Arguments
None
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. |
Notes
The default color is white (all 1s).
Not every headset system supports layer colors. See the layerColor
property of lovr.headset.getFeatures
to check for support.