Assigning colors to surfaces base on the area name

Hi everyone, I need help regarding assigning colors of a surface based on the “Area Name” for example {Work_Cafe, Living_Area, Gaming_Area} should be in Pink Color.

P.S. My goal here is that each Area/ Spaces should be colored based on the Zoning Category where for example the “Pink Color” spaces is under Social Zone.



Please simplify before uploading.

here is an example, please just plainly ignore the red X part as it’s there just for the sake of creating some random points and distributing the very same list of Radii in differend orders:

KeyValue_Search_example.gh (23.2 KB)

you will have some geometries, in the example it’s a list of points (A) and their respective diameters (B)

you can use Key/Value Component to define and retrieve some “custom attributes” to be assigned to your inputs, and the use the Search input to retrieve those data

for instance I defined a list of Values (Colors and Texts) for each unique element in Radii (Key), then used the real list of mixed/jittered Radii to retrieve those values and create preview colors and text tags

instead of Radii you might use the Area of your shapes, assuming each Area is unique

2 Likes

thank you for this!