That's a very general question, and the answer across all the combatant nations will inevitably be long and complex.
The one certainty is that all original factory finishes would have been sprayed. After that the answer goes off in many different directions.
Perhaps you might narrow the question to a specific nation? Then a more directly relevant answer might be provided.
BTW, all official UK and Commonwealth painting instructions specifically required hard-edged colour boundaries as the disruptive effect was felt to be lessened with soft edges.