To expand a bit on the above: historically, uniforms as such were only introduced in the 17th century. Before, only troops and retinue of feudal lords and knights were clothed in the heraldic colours of their masters, and some city militia in the colours of their city.
In mercenary regiments, each individual was not bound by feudal allegiance but money, and responsible for his own equipment, therefore free to choose his own personal colours. The Landsknechte did develop a certain specific exuberant fashion, which distinguished them from normal citizens and soldiers, but not from other Landsknecht forces. Uniformity would cost extra money, which neither the Landsknecht nor those who hired them could/would afford - in particular since the Landsknechte - being mercenaries - might fight soon for someone else. There are a few (very few) exceptions, though, where the recruiter of the captain paid for uniform colours in the Landsknecht regiment.
The most frequent methods to distinguish friends from foe were the standards for units, and specific brassards or similar tokens for individual soldiers.
So, to distinguish a Landsknecht unit from state forces, you could very well paint every soldier of that unit in a different colour.