Fill Background Color on Screen

I’m trying to change the entire screen color from black to red without creating an object and then filling the object or rectangle.  Is this even possible?   I thought it might save on texture memory.

Pop this into your main.lua (or anywhere, really, but using it in main.lua ensures that it happens on launch) and you’re good to go:

display.setDefault("background", 1, 0, 0)

That assumes you want a fully-red background. If you need to customize it, just change the last 3 arguments to the function to reflect the RGB values of the color you need, on a 0-1 scale (like you’d do with any setFillColor call). Enjoy!

Awesome!   Thank you.

Issue Resolved.  Thanks for the guidance. 

Pop this into your main.lua (or anywhere, really, but using it in main.lua ensures that it happens on launch) and you’re good to go:

display.setDefault("background", 1, 0, 0)

That assumes you want a fully-red background. If you need to customize it, just change the last 3 arguments to the function to reflect the RGB values of the color you need, on a 0-1 scale (like you’d do with any setFillColor call). Enjoy!

Awesome!   Thank you.

Issue Resolved.  Thanks for the guidance.