Washington authorized his officers and non-commissioned officers to wear colored badges so all soldiers could visually identify their ranks.
"As the Continental Army have unfortunately no Uniforms, and consequently many inconveniencies must arise, from not being able always to distinguish the Commissioned Officers, from the non Commissioned, and the Non Commissioned from the private; it is desired that some Badges of Distinction may be immediately provided, for Instance, the Field Officers may have red or pink colour’d Cockades in their Hatts: the Captains yellow or buff; and the Subalterns green. They are to furnish themselves accordingly—The Serjeants may be distinguished by an Epaulette, or stripe of red Cloth, sewed upon the right shoulder; the Corporals by one of green."
George Washington, General Orders, 23 July 1775founders.archives.gov
https://history.army.mil/Publications/Publications-Catalog/The-Canadian-Campaign/