setFillColor - no matter what I type I only get some mind of hue between black and grey.

Hello there and thanks for the help in advance. I am currently working on the balloon game which is provided in the tutorial and my goal for now is to make random colored balloons in my menu. However, no matter what I input as color values they only come out as black, white or grey. I am using setFillColor on the balloon image, I changed the color of the balloon to white in the actual png.

What is the problem, I dont quite understand why :( 

I appreciate all the help I can get as this one got me quite puzzled. Here is the code.

 for i=0,20 do i=i+1 random = math.random(1,255) offsetX = offsetX + math.random(10,30) offsetY = offsetY + math.random(-50,30) test = "balloon" .. i test = display.newImageRect( "balloon.png", 100, 100) test:setFillColor(random/255,random/255,random/255,random/255) test.x = display.contentCenterX + offsetX test.y = display.contentCenterY+display.viewableContentHeight-offsetY physics.addBody( test, "dynamic" , {radius = 50, bounce=0.5}) test.gravityScale = -1 test.linearDamping = 1 test.alpha = 0.9 end

What you are literally doing is creating a single global variable called  random that you give a pseudo random value between 1 and 255. You then use this single value for red, green and blue in the setFillColor () method. This is essentially the same as just providing one value to the method.

If you want random non-greyscale colours, then you need three different random values, for instance:

object:setFillColor( math.random(), math.random(), math.random() )