Hello. I’m trying to generate a random color, but always white on the screen. Why?
local width = display.contentWidth / 10
local r = width
local red, green, blue
while ( width <= display.contentWidth ) do
math.randomseed( os.time() )
red = math.random( 0, 255 )
green = math.random( 0, 255 )
blue = math.random( 0, 255 )
display.newRect ( width - r, 0, display.contentWidth / 10, display.contentHeight / 10 ):setFillColor( red, green, blue )
width = width + r
end

