I’m currently working on a Grasshopper project where I have two lists of equal length. One list consists of numbers, such as
[0, 1, 1, 2, 0, 1, 1, 3, 0, 1, 1, 0], and the other list contains corresponding surfaces.
I’m seeking assistance on how to dynamically assign display colors to these surfaces based on the numbers in my list. Each number should correspond to a specific color:
- 0 should set the associated surface to white.
- 1 should set the associated surface to black.
- 2 should set the associated surface to blue.
- 3 should set the associated surface to green.
For instance, in the example list of numbers mentioned above, the surface at index 0 should be displayed in white, the surface at index 3 in blue, and the surface at index 7 in green.
I’m open to suggestions on how to achieve this using GHPython or standard Grasshopper components. Any help, guidance, or sample scripts would be greatly appreciated.
@Mahdiyar I know you are an expert in GhPython and can help me!
Thank you for your assistance!