export random color to function

put random color generation in a function for easier changes