The short answer is: Flowers cannot naturally produce a blue pigment. The color pigments of flowers are called anthocyanins.
There are six main anthocyanins in plants: pelargonin, cyanidin, delphinidin, paeoniflorin, paeoniflorin, and malvidin. All of which are responsible for blue-purple pigments, beside pelargonin which provides a brick-red color.
The truest-blue pigment that scientists have found naturally from a plant was from the anthocyanin delphinidin, but it is still considered violet-purple and is not found in every plant. They must chemically and/or genetically intervene in order to trick the delphinidin into turning the flowers a blue color. Delphinidin is pH-sensitive so depending on the acidity of the environment, the purple pigment will also pass as blue. Scientists have even found ways to genetically modify vacuolar pH within flower petals to help achieve a more consistent, blue-like color. Other heavy metal pigments are also used by scientist to create blue pigments in flowers but unfortunately, these types of modifications are nearly impossible to pass down hereditarily unless they have some direct association with the plant’s DNA. Another problem is that genetic mutations within a plant’s DNA can cause the plant to become more easily stressed and die.
For a while, scientists believed that flowers lacked blue colors because it wasn’t a color that pollinators were attracted to. They assumed this was the case because we often see a correlation between flower color and preferred pollinators. For example, birds are often more likely to visit red flowers. More recent studies have shown that blue-passing flowers are still frequently visited by their pollinators, so they determined that flower coloration wasn’t always defined by symbiotic relationships. Pollinators were also drawn to the rewards given by the plants, such as nectar.
By now, you are probably thinking to yourself, “I know I’ve seen naturally blue flowers before!” And we completely agree with you because colors can be perceived differently by different people and under certain lighting conditions. We can analyze true color using a machine called a color spectrophotometer. A broad-spectrum light is used to project light through a sample (in this case, a flower petal), then a computer calculates what wavelengths of light were absorbed by the sample and will output the exact color composition of the sample. The wavelength of blue typically falls between 430-500nm, and “blue” flowers often have a wavelength between 380-430nm which means they are actually a shade of violet. Himalayan Blue Poppies (Meconopsis), Delphiniums, Lithodora/Glandora, and even some of our favorite Rhododendrons such as ‘Blue Baron’ and ‘True Blue’ all contain the anthocyanin delphinidin, giving them their blue-like color, but none of them are scientifically 100% true-blue.