Assign a random color

I’m trying to build a simple diagram to make a floor with hexagon tiles.
I’d like to change randomly the color of the tiles (for example 6 different colors). But I’m not able…I have been using Grasshopper for 3 days.
Can You help me?

Thanks in advanced

hexagon (11.9 KB)

This is one way…

hexagon (12.2 KB)


here a variation of @HS_Kim, you could use Color Wheel so you specify the number of color then same thing .

hexagon (18.7 KB)
I add a preview material

And if you don’t want adjacent color see that :


Thanx a lot guys!!!

P.S. @Laurent: You used material too. Is it possible to assign materials of another rendering engine like Octane Render?

For Vray I know a bit but not for Octane, search on this forum or Octane forum.

ok thanx