How come camouflage wasn't more common before the very late modern period?

by deri100

Question is self explanatory. How come fancy, bright uniforms were preferred over hard to spot, darker colored ones more alike modern camouflage? I feel like having the ability to more easily hide from the enemy would be relatively important and facilitate easier ambushes and traps. Even as far as WW1 some soldiers were regularly equipped with distinct uniforms that made them stand out against the ground and foliage. Why?

DanKensington

The dimensions of combat in the days of musketry aren't quite the same as the ones of today. Plus, one must not overlook the role of fashion. u/StoryWonker and u/dandan_noodles explain further in this thread, and u/PartyMoses has a practical look at the uniforms. As always, should anyone have more insight to contribute, further posts are always welcome!