Plutarch records that Crassus before Carrhae put on a black cloak instead of the usual "phoinix" – crimson or purple – of a Roman general. It has therefore been suggested that the black cloak was a cavalry trooper's. The pseudo-Caesarian "Bello Africano" says that the Pompeian general Scipio wore a purple cloak, and was therefore upset when his ally King Juba turned up wearing royal purple.
Legions' standards were silver animal images – the eagle after Marius, various others before that – so colour doesn't arise. Red flags were used for other purposes:
"they now plant flags, one on the spot intended for the consul's tent, another on that side of it they have chosen for the camp
these latter flags are crimson, but the consul's is white" (Polybius VI)
According to Plutarch's Life of Fabius, the vexillum standard hoisted as the signal for battle was scarlet (kokkinos). Cassius Dio mentions Crassus having a vexillum with crimson-purple lettering "to distinguish the army and its commander-in‑chief", but doesn't say what colour the background was.
Ravenscraft – the question was about the Republic. Purple did come to be associated with the Emperor once there was such a thing as an Emperor.