During the feudal age in Europe there were some kind of hierarchy among nobles, for example, a small lord provided military service to a larger lord, which did the same to a yet larger lord, etc. which at the end might serve a monarch such as a king.
Whose colors or coat-of-arms were worn by men-at-arms in a battle, for example in the shields, surcoat or armors? Did they wear the colors of their immediate lord? How could armies distinguishes friend or foe if there were hundreds of coat-of-arms?
Or did they use the colors of their monarch or the army? In this case how would the men of different lords be distinguished? And how easy were changing these when the political situation changed, e.g. serving different army, feud between lords under the same monarch?
The time and place I'm looking at is mid 14th century in Western Europe, during the beginning of the Hundred Years' War.