lovr.graphics.setBackgroundColor

Sets the background color used to clear the screen. Color components are from 0.0 to 1.0.

lovr.graphics.setBackgroundColor(r, g, b, a)

Arguments

NameTypeDefaultDescription
rnumberThe red component of the background color.
gnumberThe green component of the background color.
bnumberThe blue component of the background color.
anumber1.0The alpha component of the background color.

Returns

Nothing


lovr.graphics.setBackgroundColor(hex)

Arguments

NameTypeDescription
hexnumberA hexcode like 0xffffff to use for the background (does not support alpha).

Returns

Nothing


lovr.graphics.setBackgroundColor(color)

Arguments

NameTypeDescription
colortableA table containing 3 or 4 color components.

Returns

Nothing

Notes

The default background color is (0.0, 0.0, 0.0, 1.0).

See also