The production of the pigment melanin, which is responsible for skin color, is produced as a result of exposure to ultraviolet rays.