The random number is to generate a random value for a random color starting from the base color provided. 
So providing red, with a small offset, could provide you with any color between, say, purple and orange with random saturation and luminance.