Why Do Flags Look Similar?

Have you every wondered why most of the countries flags look similar in terms of color or design? Historical, traditional, or colonial reasons are usually behind it.