|MadSci Network: Chemistry|
Good question! Colorful reactions have always attracted people to chemistry and the chemistry of dyes and pigments is complex and fascinating.
The short answer to your question is "oxidation". The bleaching action changes the chemical structure of the dye so that it is no longer colorful.
Most dyes are large molecules containing many carbon-carbon double bonds alternating with carbon-carbon single bonds. The double bonds are particularly susceptible to attack by bleaching agents such as hypochlorite ("chlorine bleach"), peroxide, ozone, or exposure to light (especially ultraviolet light). When the double bonds are destroyed, the substance turns colorless. Further oxidation may actually cause the molecule to decompose into simpler (and still colorless) molecules.
Dye color is also affected by pH. You may have used a natural dye, such as litmus or an extract of red cabbage, to test whether a substance is acidic or basic. However, the acid- base color change is reversible, whereas bleaching is not.
This also points up the difference between pigments and dyes. Dyes are usually organic (carbon-based) compounds, while pigments are usually inorganic compounds--frequently involving toxic heavy metals. The organic compounds are far more susceptible to degradation, and thus fading, while pigments keep their color for many years--witness the fading of color photographs in a short time (10 to 20 years), while oil paintings preserve their colors for centuries.
Try the links in the MadSci Library for more information on Chemistry.