When it comes to the color-changing powers of the butterfly pea flower, acid is the name of the game. This plant turns hot water—with a pH between 4 and 8—into shades of blue that range from deep cobalt to mesmerizing azure. One more squirt of citric acid and the water changes again, this time into a vibrant magenta.

Whether you’re steeping these delicate buds in tea or grinding them into a powder and mixing it with neutral-pH foods, the result will be a stunning blue dye. With a mild herbal taste that’s likened to black tea—sans caffeine—butterfly pea is gentle in flavor, despite its visual shock factor.

Southeast Asians have used this blossom, which also goes by “Asian pigeonwings,” in traditional medicine for centuries. Traditional practitioners of Ayurveda prescribe butterfly pea flower to treat digestive, respiratory, reproductive, and nervous system conditions. Like many richly pigmented plants, butterfly pea is also linked to fighting cancer.

In Thailand, the alluring blue of the butterfly pea appears across a breadth of dishes and drinks. Hosts at hotels and spas often welcome guests with blue tea served alongside lemon and honey. Called dok anchan, this hot or iced beverage surprises and enchants visitors who discover the tea’s color-changing properties upon adding citrus. Other blue-tinted treats include flower-shaped steamed dumplings and pulut inti, a coconut-topped sweet sticky rice dish. Malaysians make a savory, similarly cosmic-looking rice, called kuih ketan.

Recently, butterfly pea flower has garnered the attention of craft-cocktail aficionados. Inspired bartenders have invented drinks that highlight the flower’s dynamic range of colors. With names like “Galaxy Magic,” “Disco Sour,” and “Mood Ring,” it’s not hard to guess why the new-wave cocktail scene loves this ancient, medicinal flower. Whether drink, dessert, dumpling, or prescription, there’s no denying the magnetic draw of such a mythically blue glow.