Pigmentation or freckling occurs due to increased melanin levels in the skin. The element called melanin is made up of melanocytes. Melanin is the component present on the upper layer of the skin. Its main function is to protect the skin from ultra violet rays coming from the strong rays of the sun. It acts as a shield for skin protection. When the amount of these melanin elements is high, there is a problem of dark skin and patchy skin.