As the title says, this was infact a random number generator, I think a lottery number generator. However, I retuned it for generating a set of colour gradients. I'm not sure how I did it exactly, but the exact weighting of the colour gradient varies by increasing a colour channel by a max/min value until it reaches the other end.
The other part is using CSS and numerical colour selection, rather then trying to use Hex websafe codes. It creates a nice effect.