Random select from a set of string values?

I am messing with some sets of neo pixel LED strings. I have the colors defind by their RGB values, I have RED, GREEN, YELLOW, BLUE, PURPLE, & ORANGE. I randomly select an LED# to assign a color to, but want to randomly pick from the colors listed above too. I cant figure that part out. Coworker said something like:

std::string Colors[6] = {“BLUE”,“GREEN”,“RED”,“YELLOW”,“ORANGE”,“PURPLE”};
int randomIndex = rand() % 3;
cout << "Random_Color " << Colors[randomIndex];

But I cant get it to work.

Any suggestions?


How about this,

char* colors[6] = {"BLUE","GREEN","RED","YELLOW","ORANGE","PURPLE"};

void setup() {

void loop() {
    int randomIndex = rand() % 6;
    Serial.printf("%s ", colors[randomIndex]);

I’ll try it, thanks.