It is important to understand what causes color in minerals in order to understand this mineral property. Color in minerals is caused by the absorption, or lack of absorption, of various wavelengths of light. The color of light is determined by its wavelength. When pure white light, that is, containing all wavelengths of visible light, enters a crystal, some of the wavelengths might be absorbed while other wavelengths may be emitted. If this happens then the light that leaves the crystal will no longer be white but will have some color.
Atomic bonds are generally the culprit.
Some elements have electrons that absorb certain wavelengths or colors. These wavelengths provide energy to the elements that will often emit another wavelength to get rid of the extra energy. The energy state of the electron is related to the wavelength that it absorbs. The bonding in this element affects the energy state of these electrons. Therefore bonds to different elements produce different colors.