It is the presence of impurities, or trace elements, that give gemstones their vivid colors. Impurities are typically foreign atoms or ions that replace or occupy spaces within the crystal lattice.