The red, green and blue colors derive from stages of Mars’ transformation from barrenness to life depicted in the epic “Red Mars,” “Green Mars,” “Blue Mars” trilogy written by Kim Stanley Robinson. Red, green and blue are also the primary components of the spectrum, symbolizing unity in diversity, as well as light itself, and thus reason and enlightenment. The tricolor form also traditionally represents the republican values of liberty, equality and justice. The flag was sewn by Maggie Zubrin and brought aboard the Space Shuttle Discovery at the invitation of astronaut John Mace Grunsfeld.
via here with image from Wikipedia