The fossilized snake-skin had three types of pigment cells in different combinations- melanophores, which contain the pigment melanin; xanthophores, which contain carotenoid and pterin pigments; and iridophores, which create iridescence.
This is a chemical reaction that takes place in the presence of oxygen and is similar to that of suntanned skin resulting in increased melanin production.