Coloring Arrayed Box Faces: Fixed vs. Random Logic

Subject: Issue with logic when assigning multiple colors to Box faces in an array

Hi everyone,

I am working on a parametric model in Grasshopper where I have an array of boxes. I am trying to achieve a specific coloring logic for each box, but currently, only one color is being applied to the entire array.

My Goal: For every single box in the array:

  1. Three specific faces must be assigned three fixed colors: Beige, Grass Green, and Light Yellow (one color per face).

  2. The remaining three faces should be assigned colors randomly selected from the same palette (Beige, Grass Green, Light Yellow).

The Problem: I am struggling with the component logic. Instead of each box having a mix of fixed and random colors, the entire array is showing only one uniform color. I suspect I might be mishandling the Data Tree or the Item Index when feeding colors into the Custom Preview or the Deconstruct Brep component.

Could anyone point out where the logic might be failing? How should I structure the list of colors to match the face indices of each box in the array?

Thanks in advance for your help!

05122026田野 增生X.gh (46.3 KB)

Thank you for your response! Could you please share a full screenshot or the updated .gh file? In the image provided, some component connections (like the output of Split List) are cut off, and I’m not sure how to correctly combine the fixed and random colors back into the Custom Preview. Thanks again!

05122026 b.gh (128.8 KB)

Thank you so much for sharing the file! I am downloading it now to test the logic. Really appreciate your help!