# Random color choice

**URL:** <https://discourse.mcneel.com/t/random-color-choice/124932>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [May 27, 2021, 1:01am UTC](https://discourse.mcneel.com/t/random-color-choice/124932 "2021-05-27T01:01:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandre.quignard](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexandre.quignard/32/307332_2.png) [@alexandre.quignard](https://discourse.mcneel.com/u/alexandre.quignard)\
**Post date:** [May 27, 2021, 1:01am UTC](https://discourse.mcneel.com/t/random-color-choice/124932/1 "2021-05-27T01:01:21Z")

</div>

Hello to all,  
I’m a new GH user…among other things, I just realized that I need to go back to math school ! 😅…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

 ![Capture 1](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/3/d/b3d5a4caa5acecf674e2739ed49443a706f6cf32.jpeg)  
 ![Capture 2](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/d/d/eddabdbbd787227fdfd6e9310aaa76ea811602f4.jpeg)

---

<div class="post-metadata">

**Author:** ![hessel40](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hessel40/32/453298_2.png) [@hessel40](https://discourse.mcneel.com/u/hessel40)\
**Post date:** [May 27, 2021, 8:40am UTC](https://discourse.mcneel.com/t/random-color-choice/124932/2 "2021-05-27T08:40:01Z")

</div>

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/b/7/db752ab04e93c03dc063675d3da4a16e755078d6.jpeg)

---

<div class="post-metadata">

**Author:** ![alexandre.quignard](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexandre.quignard/32/307332_2.png) [@alexandre.quignard](https://discourse.mcneel.com/u/alexandre.quignard)\
**Post date:** [May 27, 2021, 11:00am UTC](https://discourse.mcneel.com/t/random-color-choice/124932/3 "2021-05-27T11:00:08Z")

</div>

Thank you so much ! 👍 👍
