Fix calculation of random colors following 4d72d72