The cars are painted not in batches of colours, but instead different colours are painted in sequence as they pass through the automated spray booths...you can have a red car followed by white, followed by black, all painted by the same robotic sprayer
The biggest issue will be having just enough individual colour paint for one car set up in the robotic sprayer, when 99% of the cars ordered are the standard colours - I hate to imagine the amount of paint each paint shop goes through daily