Bake surfaces

Hi everyone. I made this script but i can’t figure it out how to bake surfaces from the colors that already exist. I also want to make only 3 colors. Anyone know how i could do that?href=“https://aws1.discourse-cdn.com/mcneel/uploads/default/original/3X/0/6/067ed16297284dff8f78bcb6ce4316d0ca49fa15.gh”>cosabien.gh (783.8 KB)

Get the Human plugin if you want to bake with colors. https://www.food4rhino.com/app/human