Asked by: Phil Rippon, Cardiff
In the 1950s, raspberry-flavoured foods were coloured dark red using a dye called amaranth. This later turned out to be carcinogenic and was banned in the US. Food manufacturers started using the bright blue dye instead, partly because it helps to distinguish it from cherry or strawberry flavours, but also because children seem to like brightly coloured foods.
Subscribe to BBC Focus magazine for fascinating new Q&As every month and follow @sciencefocusQA on Twitter for your daily dose of fun science facts.