User-821857111 posted
You need to think clearly about what you want and describe it in more detail. First of all, there is no such thing as a random colour. I suspect you mean you want to choose a colour at random from a predefined list of colours. I also suspect you don't want
the selection to be entirely random as that may lead to the same colour being selected in successive calls. I nteh meantime, here's how you can randomly select a colour from a collection of them:
string[] colors = {"Red", "Green", "Blue", "Black", "Orange", "Purple", "Grey"};
var rnd = new Random();
var randomColor = colors.OrderBy(x => rnd.Next()).Take(1);