# Randomize gradient color from lunchbox

**URL:** <https://discourse.mcneel.com/t/randomize-gradient-color-from-lunchbox/223612>\
**Category:** Lunchbox\
**Tags:** windows, rhino7\
**Created:** [October 15, 2026, 4:14am UTC](https://discourse.mcneel.com/t/randomize-gradient-color-from-lunchbox/223612 "2026-10-15T04:14:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_Sutrisno](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/sean_sutrisno/32/767400_2.png) [@Sean\_Sutrisno](https://discourse.mcneel.com/u/Sean_Sutrisno)\
**Post date:** [October 15, 2026, 4:14am UTC](https://discourse.mcneel.com/t/randomize-gradient-color-from-lunchbox/223612/1 "2026-10-15T04:14:48Z")

</div>

I was wondering how i could randomize the color pattern from my formula, unfortunately when i try to experiemnt with the gradient input i only got the following pattern, instead what i want to achieve is a more diverse color pattern, any tips for this approach? Thanks before

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/8/3/c83cf08d4c28dfa01db53853a3f97db6093bc8f1.png)

[Tinted glass formula.gh](https://discourse.mcneel.com/uploads/short-url/uc3b4r2qJPGTK65Y9rL5VRnNmR7.gh) (71.5 KB)

---

<div class="post-metadata">

**Author:** ![fad095760](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/fad095760/32/628507_2.png) [@fad095760](https://discourse.mcneel.com/u/fad095760)\
**Post date:** [October 15, 2026, 5:45am UTC](https://discourse.mcneel.com/t/randomize-gradient-color-from-lunchbox/223612/2 "2026-10-15T05:45:49Z")

</div>

Hi

because you have duplicate numbers.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/e/a/dead8fb05d2d87fef20be8b76941538f4bfb935e.png)

you can use this way:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/3/7/537a4033b98e41fc34ee7a95b9d042b20366f64e.png)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/6/f/26f68556b388207cf44036c560b445abb4398d27.png)

---

<div class="post-metadata">

**Author:** ![Sean\_Sutrisno](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/sean_sutrisno/32/767400_2.png) [@Sean\_Sutrisno](https://discourse.mcneel.com/u/Sean_Sutrisno)\
**Post date:** [October 15, 2026, 6:22am UTC](https://discourse.mcneel.com/t/randomize-gradient-color-from-lunchbox/223612/3 "2026-10-15T06:22:07Z")

</div>

Thanks for the fix. Also, care to explain why duplicated numbers affect the distribution? i’m still learning the hang of it

---

<div class="post-metadata">

**Author:** ![fad095760](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/fad095760/32/628507_2.png) [@fad095760](https://discourse.mcneel.com/u/fad095760)\
**Post date:** [October 15, 2026, 7:48am UTC](https://discourse.mcneel.com/t/randomize-gradient-color-from-lunchbox/223612/4 "2026-10-15T07:48:37Z")

</div>

> [@Sean\_Sutrisno](#):
>
> Thanks for the fix. Also, care to explain why duplicated numbers affect the distribution? i’m still learning the hang of it

Because the values obtained from the Area component are repeated, and these repetitions may occur randomly rather than in a sorted list, using Average with the Deconstruct Domain component will always result in a list containing duplicate values.  
I hope this clarifies.
