Your alpha value is 1.0. You probably meant 255 .
glClearColor(rand()%256, rand()%256, rand()%256, 1.0);
Edit: It's also possible that glClearColor expects floats clamped to 1.0, in which case it's highly likely you're always getting white since rand()%256 will usually be nonzero. Try dividing the results of that calculation by 255.0f to find out. (Or check the documentation... either way, don't mix clamped floats and integer formats.)