I have a set of Graphics3D primitives (here, spheres) which I would like to assign either:
- One of a subset of colors, e.g. {Green, Red}
- A random color over some RGB interval
Writing something like:
Graphics3D[{RGBColor[RandomInteger[{0, 1}], RandomInteger[{0, 1}], RandomInteger[{0, 1}]],
Sphere[{#[[1]], #[[2]], #[[3]]}, #[[4]]] & /@ SphereList...
...appears to only assign one random color to all of the spheres.
I can force this to work by generating a string that explicitly specifies a random color for each sphere, but is there a simpler way to make this work?