The method for whitening cloth, paper, or any material is called bleaching. If you would like to see bleaching in action, try the following experiment.
Stir a few drops of ink into half a glass of water. Add two or three drops of chlorine laundry bleach. (Be careful not to let the bleach touch your skin. It is very strong and could burn you.) You will see the ink in the glass lose color as the bleach is added.
Chlorine bleach is good for whitening cotton and linen. So is hydrogen peroxide. Some people use hydrogen peroxide to turn their hair blond. Silk and wool are bleached by wetting them and exposing them to the gas sulfur dioxide. Sulfur dioxide is the gas you smell when a match has just been lit. More than 3,000 years ago, the Egyptians and Babylonians bleached by spreading wet cloth on a surface exposed to the rays of the sun.