In my opinion, generally, the medieval army ranks were recognized through the use of colors. In most armies, you had at least one king, but there are also those seated on a throne and surrounded by color guards. The Guards were typically in green or red uniforms with gold trim. The knights or mounted Warriors would be military elites as they carried weapons on horseback and wore bright blue clothing that could withstand a long fight while still being effective for combat.
Finally, infantrymen who carried swords and shields usually came in yellow to represent their relevance to the sun god from which they drew their names—Sol Invictus (Saint Michael) in Rome, Saint George for England’s Dragon slayer and Saint Andrew for Scotland’s patron saint.