Why was purple barely used in flags and uniforms throughout history?

by buy_some_winrar
aschsr

The raw materials needed to make purple dye were incredibly rare/expensive. This made it not economical to use for flags/uniforms/etc.

Some of the only usages were by royalty.