Where does this come from? Why do soldiers talk about their color(s?) instead of their flag (like in capture the flag).
1 Answer
It's not so much slang as an extended or metonymous use. The sense development is fairly clear. The OED has it like this:
1. A hue or tint.
d. A colour, or each of a combination of colours, which is distinctive or symbolic of an institution or group, as a school, political party, or street gang. Cf. senses 14, 19a.
14. Chiefly Brit., Austral., and N.Z. Political allegiance. Now chiefly in extended metaphors.
19a. In pl. An item or items of a particular colour worn to identify or distinguish an individual or a member of a group; spec. (originally) the cognizance or insignia of a knight; (later) a rosette, ribbon, etc., worn as the badge of a political party; (now chiefly) a jockey's silks; the kit worn by a member of a sports team.
20a. In pl. Usually referring collectively to the particular combination of flags flown by a given ship or carried by a regiment.
20b. In pl. By metonymy: a regiment; (later also more generally) the armed forces of a country. In later use usually as retained in set expressions, as to desert one's colours, to join the colours, service with the colours, etc., where sense 20a is often understood, without metonymy.
20d. Chiefly U.S. (orig. U.S. Navy). In pl. A national flag, esp. as an object of allegiance.