Melanism has been shown to occur in a variety of animals, including mammals (squirrels, many felines, many canids); reptiles (coral snakes); and insects (peppered moth).
Many examples of melanism are known among felines. Melanism is due to changes in the agouti gene which controls banding of black and light areas on the hair shaft. Leopards and jaguars with this condition are often called black panther (although cougars are also known as panthers, there are no verified cases of melanism in that species). However, the leopard, the jaguar, the lion and the tiger are all members of the Panthera genus. One good example of melanism expressed within a certain animal community is that of the leopard population in Malaysia, South East Asia, in which case up to 50% of the population has melanism. That is apparently due to them being more cryptic in their dusky rainforest habitat. Better resistance to viruses may also explain the greater prevalence of black leopards in those areas.
In the Jaguar, melanism is due to a recessive gene mutation meaning that black jaguars may produce spotted offspring. In the leopard, melanism is due to a dominant gene mutation meaning that two spotted leopards carrying the gene may produce black cubs, but black leopards will breed true when mated together.
Melanism has been found to be linked to beneficial changes in the immune system. "The Smithsonian Answer Book: Cats" notes that genes for melanism in felids may provide resistance from viral infections and that a viral epidemic may explain the prevalence of black leopards in Java and Malaysia, and the relatively high incidence of black leopards and black servals in the Aberdares region of Africa. Previously, black furred felids in the Aberdares had been considered a high altitude adaptation due to absorbing more heat.
Studies reported in New Scientist magazine in 2003 also suggested that recessive-gene melanism is linked to disease resistance rather than altitude. According to Eduardo Eizirik and Stephen O'Brien of the United States National Cancer Institute in Maryland, the melanism mutations involve the same gene family as those involved in human diseases such as AIDS. Melanistic cats may therefore have better resistance to disease than cats with "normal" colour coats. This would explain why recessive melanism persists when melanistic individuals are disadvantaged due to being poorly camouflaged in open areas.
In the United States National Cancer Institute studies, black cats were found to have changes to a gene known as MC1R. MC1R is a member of a family of genes that includes the human gene CCR5 which codes for a protein on the cell membrane. This protein is a key allowing in various viruses, including HIV. Melanism could make black cats less susceptible to certain viral infections making melanism an evolutionary advantage.
In animal species that normally have black markings on a paler background colour, excessively abundant markings (abundism) which merge or overlap produce an effect called pseudo-melanism. The background colour may still be discerned between the markings, but to the casual observer, or from a distance, the animal appears to be black.