rgb(random(255), random(255), random(255))
But, that just sets the canvas to a random solid color.
This is just a guess, but one solution might be to create a grey gradient background in a paint program and then, to get random color you can add an 'effect' like 'color' to the sprite and randomize it's parameter. I haven't experimented with it though.