Random number for RGB Led

Yeah sure so my function would be something like

void randomColor(int led) {
int rand = random(0,3);
if (rand == 0) {
colorRed(led);
}
else if (rand == 1) {
colorGreen(led);
}
else if (rand == 2) {
colorBlue(led);
}
}

and then
for (int i = 0;i<ledArray.length;i++) {
randomColor(i);
}

right ?

I will try that out now.