Layer:getColor

Edit

Returns 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

NameTypeDescription
rnumber The red component of the color.
gnumber The green component of the color.
bnumber The blue component of the color.
anumber 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.

See also