Step 1: Chlorophyll's structure includes a porphyrin ring complexed with a central magnesium ion, and a phytol tail. The phytol group makes chlorophyll soluble in fat.
Step 2: Alkali treatment (e.g., NaOH or KOH) causes saponification. This process cleaves the ester bond linking the phytol tail to the chlorophyll molecule, thus removing it.
Step 3: The resulting product is chlorophyllin, a salt. Chlorophyllin retains the porphyrin ring and magnesium ion, maintaining a green color. The removal of the phytol tail makes chlorophyllin water-soluble.
Acid treatment, conversely, replaces the magnesium ion with hydrogen, producing pheophytin, a dull olive-brown compound.