Random color choice

Hello to all,
I’m a new GH user…among other things, I just realized that I need to go back to math school ! :sweat_smile:…well. I want to solve a problem. On the image of the panel, you see cubes placed randomly, the colors are generated with the Gradient tool…now I want to choose only six colors and distribute them randomly.
If you look at the panel, I have a second problem, but I would like to solve the colors first. Thanks for your help

Thank you so much ! :+1: :+1: