When you boil green vegetables, they quickly lose their bright color. This is because of heat, which tends to bump magnesium out of the chlorophyll molecule, and the presence of hydrogen in the cooking water. When the magnesium starts to get itchy feet, the hydrogen slyly agrees to take its place, turning the chlorophyll molecules grayish- or yellowish-green.
The loose hydrogen ions are the result of acids in the cooking water--which automatically show up when you boil vegetables, since they all contain acids--so if you add an alkaline chemical, the chlorophyll will stay green. American cooks used to add sodium bicarbonate to vegetables for this purpose. It's no longer recommended, because it makes the vegetables mushy and may reduce their vitamin value.
The bicarb trick has actually been known for thousands of years. A 2nd century Roman cookbook recommended adding a substance called nitrum to boiling vegetables, and medieval Arab cookbooks sometimes called for natru^n, which was the same thing. Nitrum (nitre in English) is a mixture of hydrated sodium carbonate and various nitrates, and is found in desert regions.
If the word "nitre" sounds familiar, it's because about 200 years ago chemists realized that one of the elements of nitre was a colorless, odorless gas, which they named nitrogen, or nitre-maker.