White hair contains no pigment -- that's why it's white. Unfortunately, just as with white items of clothing, it's easily stained with other colors from everyday life. Thus, white hair can start to turn yellow just from contact with chemicals in the air around you. Fortunately, with a little bit of preventative attention, you can keep it snowy white, just the way it should be.
Wear a swim cap. Chlorine in the pool is notorious for doing a job on hair color. If you swim regularly, purchase a good-quality swim cap and wear it religiously. If you swim occasionally, thoroughly rinse out the chlorine in the locker room shower as soon as possible after you leave the pool.
Add a water filter to your shower. Impurities in your water supply can also cause white hair to turn yellow. A water filter will remove those impurities and help your hair stay white.
Ditch the dandruff shampoo. The active ingredient in many shampoos, selenium sulfide, is known to turn white and gray hair, yellow.
Use a corrective shampoo. Nowadays you can find plenty of shampoos designed specifically for gray and white hair. Usually they contain brighteners and a corrective bluish tint meant to color balance your hair tone. This means you should be careful how often you use them, lest you over correct and end up with blue hair.
Try a deep cleaning shampoo. Look for brands that advertises as "clarifying" or "removes buildup." Again, don't use this too often, as it can strip your hair, and make it dry and hard to manage. Give it a good conditioning treatment after your wash just in case.
Use baking soda. This is an inexpensive alternative to clarifying shampoos and other deep-cleaning treatments. Mix 4 tablespoons baking soda to 1 quart water. Use this before you shampoo; massage it into the roots of your hair and all the way to the ends. Rinse your hair thoroughly, then shampoo and condition as usual.
Try herbal remedies. A wash with lemon juice and water, or chamomile tea helps brighten hair tone. Use just after shampooing, massage throughout your hair, then rinse clean and towel dry.