THis works if you want the color to change at a given hight. But is very poor if you need the color stripes to be not horizontal. To be general purpose you need to use more then one print head on the printer.
For robots, I don’t think we care much about color but using different types of plastic in the same part might be good. I have been wanting to mix ABS and TPU to make robot jpoints that are a little bit compliant. It to make soft pads and fingers and feet.
The other way to make multi-color parts is to cut the part and print each sub-part in a different color then use CA glue to assemble.
THis is a good way to make TPU tires over ABS wheels or to print tank tracks with TPU pads on each link.