A condition involving abnormal and excessive amounts of melanin or other pigments (e.g., brown, black, or blue) in the skin or other tissues of the body due to various causes (e.g., chronic friction, sunburn, pregnancy, metastatic melanoma).