I generate a random color this way:
var random = new Random(); var color = String.Format(\"#{0:X6}\", random.Next(0x1000000));
How can I
You can install ColorHelper library via NuGet and use next code:
using ColorHelper; RGB rgb = ColorGenerator.GetDarkRandomColor();
Instead of RGB class you can use another. E.g.: HEX, CMYK or another.