Change color of material on click going through a list

I Used it and worked just fine!!

To make a color array with default values u can just click on a slate color variable (exemple) and set it to array! Thanks!!