How To NOT Instantiate the same Prefab Twice (C#)

Hello, I have 5 prefabs (5 different colors[blue,red,pink,yellow,green]) and every 10 seconds My Game Instatiate one of those randomly, for the next 10 seconds. Because is Randomly generated, sometimes it generates the same color after the 10 seconds. For example: Generates Blue the first 10 seconds and generates Blue again for the next 10 seconds.

How do I Randomly Generate my prefabs without Generating the same prefab twice in row?.

Thank You.

You could make an enum { blue, red, … } and keep track of the last one that it picked, then randomly pick a new one after 10 seconds. If the new one is the same color as the last one, then randomly pick again.