The BBC Good Food logo
Rainbow cake on stand with a slice cut away

Rainbow cake

A star rating of 5 out of 5.2 ratingsRate
Magazine subscription – your first 5 issues for only £5!
  • Preparation and cooking time
    • Prep:
    • Cook:
    • plus cooling and at least 1 hr 30 mins chilling
  • More effort
  • Serves 12 - 14

Show support for the LGBTQ+ community by making this beautiful rainbow layer cake, ideal for sharing at Pride festivities

  • Vegetarian
Nutrition: per serving (14)


  • 340g unsalted butter, softened, plus extra for the tins
  • 340g caster sugar
  • 6 large eggs
  • 1 tsp vanilla extract
  • 340g self-raising flour
  • 1 tsp baking powder
  • 2 tbsp milk
  • 400g caramel, or lemon curd

For the Swiss meringue buttercream

  • 5 egg whites
  • 375g caster sugar
  • 500g unsalted butter, cubed and softened
  • 3 tsp vanilla extract
  • food colouring gels (for Pride, the colours are red, orange, yellow, green, dark blue, purple, light pink, baby blue, brown and black)


  • STEP 1

    Butter three 20cm round cake tins and line their bases with baking parchment. Heat the oven to 190C/170C fan/gas 5. Beat the butter and sugar together in a large bowl until light and smooth. Gradually beat in the eggs until combined, then mix in the vanilla. Fold in the flour and baking powder to fully combine. Stir in the milk to loosen.

  • STEP 2

    Divide the mixture between the three tins, and bake the sponges for 20 mins until golden and a skewer inserted into the centre of each cake comes out clean. Leave to cool in the tins for 10 mins, then transfer to a wire rack to cool completely.

  • STEP 3

    Meanwhile, make the Swiss meringue buttercream. Put the egg whites and sugar in a heatproof bowl set over a small pan of gently simmering water, ensuring the bowl doesn’t touch the water. Whisk for 3-4 mins until the sugar dissolves. Remove from the heat and tip the mixture into the bowl of a stand mixer, or use an electric whisk, and whisk for 10 mins on a medium-high speed until you have a thick meringue. Gradually whisk in the softened butter 1 tbsp at a time until fully incorporated and the buttercream is fluffy. Mix
    in the vanilla extract.

  • STEP 4

    Put one of the sponges on a plate or cake stand, top it with 3-4 tbsp of the buttercream and spread out so that it’s thicker at the edge. Add half of either the caramel or lemon curd and spread over the icing on the middle part of the cake – don't spread to the edges. Add the next sponge, and repeat. Top with the final sponge. Smooth a thin layer of the buttercream around the cake – this is called a crumb coat. Chill in the fridge for at least 45 mins, then smooth another layer of buttercream around the cake using a palette knife to fully cover the sponge, reserving half for decoration. Put the cake and reserved buttercream back in the fridge for another 45 mins-1 hr.

  • STEP 5

    Divide the remaining buttercream between 11 small bowls and mix in a different gel colouring to 10 of them, leaving the last bowl white. Use a different piping bag for each colour, either cutting a 1cm hole in the end or applying a round nozzle.

  • STEP 6

    Pipe one row of buttercream blobs in alternating colours from the top to the bottom of the cake, then use a teaspoon or small palette knife to very lightly smear each blob of frosting away from you. For the second row, choose the colour that is next in sequence to the colour alongside it, piping over the thinnest part of that smeared blob. As you continue to pipe around the cake following this pattern, you will create a swirl effect of colours.

  • STEP 7

    Continue the previous piping method in a circle on top of the cake, but this time smearing the icing in towards the middle of the cake until the cake is covered, then it's ready to slice and serve. The cake will keep in an airtight container for up to three days.

Gel colours

Instead of buying all of the gel colourings, you can buy the primary colours (plus black and brown) and make the other shades by mixing them. 

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 5 out of 5.2 ratings

Sponsored content