Background Generally, cyanidin facilitates pink to red petal colours, whereas it causes the expression of a vivid blue colour in cornflower. Previous chemical studies show that the pure blue colour in cornflower petals originates from a blue supramolecular pigment composed of cyanidins, apigenins and metal ions in a stoichiometric ratio, suggesting that the generation of this blue pigment complex is precisely regulated. However, the potential molecular mechanism remains unclear, restricting the innovation of blue cultivars in flowers originally accumulating cyanidin derivatives.Results In the present study, we traced the dynamic changes in petal colour from white to violet and, finally, to blue on the same petal in cornflower. Pigment analysis showed that apigenin biosynthesis started in the white region and peaked in the violet and blue regions, while cyanidin accumulated in the blue region to almost 2.5-fold higher than that in the violet region, suggesting that the content ratio of the two flavonoids plays a key role in blue colour development. Nine libraries from the above three colour regions were constructed for RNA-Seq, and 105,506 unigenes were obtained by de novo assembly. The differentially expressed genes among the three colour regions were significantly enriched in the phenylpropanoid biosynthesis and flavonoid biosynthesis pathways, leading to the excavation and analysis of 46 structural genes. Moreover, the R2R3-MYB and IIIf bHLH proteins were identified as cyanidin biosynthetic activators by both the dual luciferase reporter assay and transient over-expression in tobacco leaves. Moreover, eight differentially expressed unigenes possibly involved in metal ion transport, storage, tolerance and chelating processes were screened out.Conclusion The co-existence as well as the appropriate ratio of cyanidin and apigenin directly influence the blue colour development in cornflower. CcMYB6-1 and CcbHLH1 are identified as activators in regulating cyanidin biosynthesis and metal ion related gene resources that may be involved in chelating with flavonoids are also mined. These obtained results provide new insights into the generation of the blue supramolecular pigment in cornflower.