Custom Pattern in Floor with different Materials

Hello, I’m new with Dynamo and I’m trying to set different materials in a custom floor pattern that I already create. I show you and example that I made manually, I spent a lot of time on it so now I want to automatize with Dynamo for future projects, but I don’t find the best way to do it.

Basically there are 6 floors overlapping, one is with a 100% transparent surface material to show only the custom pattern lines, an the other five floors are each different material/color were the boundary is following the custom design pattern. The floor with the pattern have the total layout of the floor, and it used also to create the curb with the slab edge tool.

Maybe there is a better solution to set the different materials to each brick automatically on a custom pattern created previously or creating the pattern directly in Dynamo? Maybe using the split face & paint tool is an option also, but the idea is to have a base custom design (that can be define each brick color randomly) that I can repeat like a hatch to fill all the region of a floor that could have curves and slopes also.

Thank you.