The fur of a polar bear contains no pigment and is actually not white at all. Polar bear hairs have hollow cores and are transparent. The "white" appearance of a polar bear is due to effects of scattered, reflected light.
Over the year, a polar bear's fur can darken due to the presence of dirt and old fur. When a polar bear emerges from a molt period in late summer, the animal is the whitest it can be until the next molting. Strong sunlight amplifies the effects of the polar bear's fur in a fashion similar to snow. In captivity, polar bear fur can become green due to the presence of algae colonies.