Melanin contributes to the ability of fungi to survive in harsh environments. In addition, it plays a role in fungal pathogenesis. Melanin is an amorphous polymer that is produced by one of two synthetic pathways. Fungi may synthesize melanin from endogenous substrate via a 1,8-dihydroxynaphthalene (DHN) intermediate.