For the buttercream


  • STEP 1

    Heat the oven to 180C/160C fan/gas 4 and fill a cupcake tray with 10 cases.

  • STEP 2

    Beat the butter, vanilla and caster sugar together with an electric whisk until pale and fluffy. Gradually whisk in the eggs, scraping down the sides of the bowl after each addition.

  • STEP 3

    Mix in the flour and a pinch of salt until just combined. Divide into five bowls and colour each a different shade with a drop of food colouring. We chose red, yellow, green, blue and purple.

  • STEP 4

    Starting with the end of the rainbow (in our case purple), evenly spread 1 tsp of the mixture into each cupcake case using a piping bag or the back of a teaspoon. Top with 1 tsp of the next colour and spread – be careful not to mix the colours together whilst bringing the mix all the way to the edge of the case. Repeat until all the colours are used up and you’re left with an even layer of red on the top.

  • STEP 5

    Bake for 15 mins, until a skewer inserted into the middle of each cake comes out clean. Leave to cool completely on a wire rack.

  • STEP 6

    To make the buttercream, beat the butter until very soft. Add the icing sugar, vanilla extract and a pinch of salt and whisk together until smooth (start off slowly to avoid an icing sugar cloud). Beat in the milk until combined.

  • STEP 7

    Pipe the buttercream on top of the cupcakes using a circular nozzle, or spread on with a palette knife. Top with sprinkles, if you like.


Make sure you use gel food colouring or similar that keeps its colour when baked. Some liquid food colourings lose their vibrancy after being heated. 

Goes well with


Comments, questions and tips

Rate this recipe

What is your star rating out of 5?

Choose the type of message you'd like to post

Choose the type of message you'd like to post

Overall rating

A star rating of 4.4 out of 5.15 ratings