Pigmentary coloration is widespread in animals. Its evolutionary and ecological features are often attributed to the property of predominant pigments; therefore, most research has focused on predominant pigments such as carotenoids in carotenoid-based coloration. However, coloration results from predominant pigments and many other minority pigments, and the importance of the latter is overlooked. Here, we focused on porphyrin, an uncommon pigment found in bird feathers, and investigate its importance in the context of feather color changes in the barn swallow Hirundo rustica. By irradiating UV light on feathers, we investigated feather color change and its relationship with porphyrin pigmentation in the barn swallow. We found that the pheomelanin-based coloration of the barn swallow faded after the irradiation of UV light, and this effect was particularly strong in the feathers of young swallows (nestlings and fledglings, here). We also found that it is not the predominant pigment, pheomelanin, but protoporphyrin IX pigment that showed the same pattern of depigmentation after the irradiation of UV light, particularly in the feathers of young swallows. In fact, the abovementioned age-dependent feather color change was statistically explained by the amount of porphyrin in the feathers. The current study demonstrates that a minority pigment, porphyrin, explains within-season dynamic color change, an ecological feature of feather coloration. The porphyrin-mediated rapid color change would benefit young birds, in which feather coloration affects the parental food allocation during a few weeks before independence, but not later. Future studies should not ignore these minor but essential pigments and their evolutionary and ecological functions.