How would i do this?

How would i do something like this.?

local actualW = display.actualContentWidth local actualH = display.actualContentHeight local centerX = display.contentCenterX local centerY = display.contentCenterY local function funt( colorOne ) local first = display.newRect( centerX, centerY, actualW, actualH ) first:setFillColor( colorOne ) end funt( (1, 0, 0) )

So i want to call the function and add a color into it background. How would i do that?

–SonicX278 

In the future, it would be best if you used a more descriptive title.

local function funt( colorOne ) local first = display.newRect( centerX, centerY, actualW, actualH ) first:setFillColor( unpack( colorOne )) end funt( {1, 0, 0} )

Yes i try to but i couldn’t figure out how to explain it in a couple words so yaa. But thanks! It worked!

–SonicX278 

In the future, it would be best if you used a more descriptive title.

local function funt( colorOne ) local first = display.newRect( centerX, centerY, actualW, actualH ) first:setFillColor( unpack( colorOne )) end funt( {1, 0, 0} )

Yes i try to but i couldn’t figure out how to explain it in a couple words so yaa. But thanks! It worked!

–SonicX278