Walk through a damp autumn wood and you can find mushrooms in almost every color: the scarlet of fly agaric (Amanita muscaria), the egg-yolk gold of chanterelles (Cantharellus cibarius), the sooty black of black trumpets (Craterellus cornucopioides), and even blues, purples and greens. Fungi do not photosynthesize, so none of these colors come from chlorophyll. Mushroom colors come from a wide range of pigments built into the cells of the cap, gills and stem. Many of these pigments are chemically unusual, and mycologists are still working out what most of them do.
Several broad groups of pigment are well known. Melanins, the same general class of compound that darkens human skin, are common across the fungal kingdom. They give many species their browns, greys and blacks. Carotenoids, the yellow-to-orange pigments also found in carrots, occur in some fungi. The orange pigment canthaxanthin was actually named after the chanterelle genus Cantharellus. Other mushrooms produce pigments derived from amino acids or from aromatic compounds. The vivid reds and yellows of fly agaric come from a distinctive family of these. Some boletes contain pale compounds that oxidize and turn blue when the flesh is cut. That is why color can suddenly change in your hand.
Why make pigment at all? The best-supported idea involves melanin. Melanin appears to help shield fungal cells and spores from ultraviolet radiation, drying and other stresses. That may explain why spores and the caps of exposed species are often dark. Research comparing mushroom communities across Europe has suggested that assemblages in colder regions tend to be darker on average. One possible reason is that darker caps absorb more heat from the sun, which would be helpful in a cool climate. Other pigments may act as antioxidants or have antimicrobial effects. Some researchers suspect that certain colors and the chemicals behind them may influence insects, slugs or mammals that eat mushrooms or spread spores. However, the evidence for color acting as a deliberate warning signal in fungi is far weaker than it is for brightly colored frogs or insects.
Color is also much less fixed than people expect. The same species can look quite different depending on age, weather, light and habitat. Rain can wash pigment out of a cap, and sun can bleach it. Fly agaric caps can fade from red to orange or even yellowish after heavy rain. In the Russula brittlegills, a single species can show several cap colors, while different species can look nearly identical. Gills often change color as spores mature, which is why a young mushroom and an old one may not match the same photo. For this reason, field guides treat color as just one clue among many, and seldom as a deciding one.
This leads to one of the most dangerous mushroom myths: that brightly colored mushrooms are poisonous and dull ones are safe. It is simply not true. The death cap (Amanita phalloides) is responsible for a large share of fatal mushroom poisonings worldwide, and its cap is a muted olive, yellowish-green or sometimes almost white. The destroying angels, such as Amanita virosa, are pure white. Meanwhile, the vivid chanterelle is a popular edible, yet it has toxic orange look-alikes such as the jack-o'-lantern mushrooms (Omphalotus species). Many small brown mushrooms that look completely unremarkable include deadly species like the funeral bell (Galerina marginata). No color, and no other single trait or folk test, can tell you a mushroom is safe. Only an expert who has examined the actual specimen can confirm whether a wild mushroom is edible. Some deadly species closely resemble popular edible ones.
If you are curious about a colorful mushroom you have found, color is a good starting point, but it needs support from other features. Note the cap texture, the gills or pores underneath, any ring on the stem, and especially the stem base, where some deadly Amanita species have a sac-like volva that is often hidden in soil. Photograph the cap from above, the gills from below and the full stem including its base. Then let Shroomly suggest likely species and point out any toxic look-alikes. Treat that result as a lead, not a verdict, and confirm the identification with a local mycological society or an experienced expert. If anyone may have eaten a wild mushroom, call poison control or emergency services immediately and keep a sample of the mushroom.

