With gemstones; each particular mineral absorbs light and refracts some of the light, and the wavelength of that refracted light determines the colour that we see in the gemstone. When the gemstone is formed with impurities inside, different impurities are present in different colours.