In 1914 the European armies went to war in what amounted to parade uniforms. In some cases, it was felt that brightly colored uniforms would help soldiers to recognize their comrades when in battle. After heavy casualties the armies hurried to introduce field uniforms that gave the soldiers some protection from becoming targets.
The allies adopted a form of camouflage for ships too. You can read about this here.