It contains thuaone and should be eaten in moderation. If the yellow flowers are picked young, they have a sweet, honey-like flavor. Mature flowers are bitter. If in doubt, ask or just don't eat them. Their flavor is a combination of asparagus and zucchini.
Some people think that different colored blossoms have different flavors.
They make a nice garnish and may be stuffed for hors-deuvres or made into fritters. The spicy, clove-like flavor is more intense in some species. D. caryophyllus , a tender perennial grown usually as an annual, is reported to have great flavor. Always remove the white-colored base of the petal, as it may be bitter. The blossoms are a creamy color and have a sweet flavor.