Well, you're right. Most British regiments did, in fact, wear red. Some, however, wore green, and artillerists in every army wore blue with red facings.
If by "the same time period" you meant the American Revolution, then the Americans were all over the place. Every man in this image is a soldier in the Continental Army on the march to Yorktown, one of the more uniform periods in the army's history. Regimental coats varied by state AND by year for much of the war, though eventually the army agreed at least on the goal of a blue coat with white, red, or blue facings.
Spain and France were both ruled by Bourbon monarchs, so royal regiments in both armies (those traditionally raised directly by the monarch) wore white. Units raised by their colonels, or ethnic units - like these German or Irish regiments in French service - could have wildly different uniforms.
The follow up question to this is nearly always "with all these shared colors, how did people not shoot each other by accident?" The main answer to this is that these men, in long, loud, bright uniforms with cumbersome, clattering muskets were not trying to sneak up on anybody. The basic fighting unit was the battalion - hundreds of men standing in close formation, marching together. Quite plainly, the guys in front of you were the enemy, and the guys beside you were friends. Big melees like you see in the movies really didn't happen that often, even when the fighting closed to hand-to-hand.
The second answer is that, in rare cases, people did get confused, and friendly fire happened. That usually has to do with the amount of smoke on the battlefield obscuring everything, rather than someone shooting at the wrong color coat.
I asked a related question a little while ago, and while the response doesn't directly answer your question, some relevant points are made:
EDIT: credit to u/SafeReturnDoubtful for the original reply to my question.