Plant pigments have different functions. Both types of flavonoids, anthocyanins and anthoxanthins, are important pigments in flowers and fruits, though anthocyanins also occur in leaves.
Flavonoids are sensitive to light and absorb specific wavelengths.
These pigments provide flowering plants with colours which attract animals that pollinate flowers and disperse their seeds. Chlorophylls and carotenoids provide the plant with colour and act as photoreceptors. They capture the energy of specific wavelengths of light and transform it into biochemical energy the plant can use for biological processes. The most important of these is photosynthesis. Animals' colour usually play an important role in visual communication between members of the same species.