Flamingos are pink because of what they eat: carotenoid pigments
The orange of carrots, the red of tomatoes and salmon, the yellow of egg yolks and the colour of flamingo feathers all come from one pigment family. More than 1,100 carotenoids are known, and in plants they do double duty, harvesting sunlight and shielding the leaf from damage.
Plants, algae and some bacteria, archaea and fungi make carotenoids; animals like flamingos acquire them through food. Each molecule is built from eight isoprene units, giving 40 carbon atoms arranged in a long chain of alternating single and double bonds. That chain absorbs violet to green light, roughly 400 to 550 nanometres, so what bounces back looks yellow, orange or red. The longer the run of alternating bonds, the redder the colour. Chemists split the family in two: carotenes such as beta-carotene and lycopene contain only carbon and hydrogen, while xanthophylls such as lutein carry oxygen and tend to be yellow.
Every photosynthetic organism produces them. They act as helpers to chlorophyll, catching light at wavelengths chlorophyll misses and passing the energy along. They also act as a safety valve. Sunlight generates reactive oxygen and overexcited chlorophyll that can wreck the photosynthetic machinery; carotenoids soak up that excess energy and neutralise singlet oxygen, protecting membranes from damage. Drought and disease can prompt plants to make more of them, and they help trigger production of the hormone abscisic acid, which governs seed dormancy and stress responses.
In autumn, carotenoids dominate the leaf colour of roughly 15 to 30 percent of tree species, though many reds and purples come from different compounds called polyphenols. Among foods, dried carrots hold the most carotene per 100 grams, and Vietnam's gac fruit has the highest known concentration of lycopene. Dark greens like kale and spinach are rich in beta-carotene even though they look green.
Some carotenoids, including beta-carotene, can be turned into vitamin A in the body, which supports vision in dim light, immune function and skin. Lutein and zeaxanthin collect in the eye's macula, but their exact role in vision is still being studied, and links to heart disease or cancer remain uncertain.
Source: Carotenoid