The porcupines and the beavers teeth are composed of two different materials, the outer,orange colored portion is harder, the whiter inner portion is much softer. When the animals chew things the softer material wears away faster than the colored, harder part of the teeth are constantly sharpened as they wear and grow. Part of the difference in color is simply due to the different composition. However another reason is that some trees and leaves like Aspen and Birch contain tannin which leaves stains on the rodents teeth.