The color red comes from the flag that signifies the Jacobin club during the French Revolution. Due to this placement and the dominance of the Jacobin ideology in French liberalism, the red flag would become the dominant flag of liberal thought for the next fifty years.
Then in 1870, the Second French Empire died and the people of Paris decided to make an attempt to institute Communism. This Paris Commune would stand apart from the rest of France, by then ruled by the Third Republic in Versailles. They resisted the French government and rebelled, using the red flag to symbolize their liberal resistance. From here the flag would be associated not with liberalism but Communism.