The different colors and patterns in domestic cats result from the genetics of a pigment called melanin. In cats, melanin comes in two forms, and the genes' coding for these forms and controlling of their expression result in the wide variety of cat coats and colors.
The two kinds of melanin in cats are eumelanin and pheomelanin. Eumelanin is black, and pheomelanin is red. These pigments have several mutations, with eumelanin having more mutations than pheomelanin. One gene also modifies pigmentation by diluting it, producing a less saturated, softer color. Black is the basic eumelanistic color, with brown and light brown as its mutations. All three dilute into grays or ashy browns.
The basic pheomelanistic color is orange, which dilutes into yellow (called cream by breeders). There are separate genes for white spots, tabby striping, color points and ticked hair. The calico pattern is a special case. Pheomelanin is sex-linked; the X chromosome determines the cat's sex. Female cats have two X chromosomes, but male cats have only one. When a female cat is born with the eumelanin gene on one X chromosome and the pheomelanin gene on the other, it has a mottled pattern of black and orange fur. This pattern is called calico. The mottling is a result of one X chromosome's random inactivity in every cell of the cat's body, which prevents the cat from producing double the number of X-linked traits.