Rainbow cake

Rainbow cake

  • 1
  • 2
  • 3
  • 4
  • 5
(138 ratings)

Prep: 2 hrs Cook: 1 hr

A challenge

Cuts into 18 slices
A stunning celebration cake of six or seven colourful layers and cream cheese frosting - an impressive showstopper.

Nutrition and extra info

  • Freeze un-iced sponges only

Nutrition: per slice

  • kcal601
  • fat29g
  • saturates18g
  • carbs73g
  • sugars47g
  • fibre2g
  • protein11g
  • salt0.6g
Save to My Good Food
Please sign in or register to save recipes.


    You'll need 3 x these ingredients for six sponges

    • 125g butter, softened, plus a little extra for greasing



      Butter is a dairy product made from separating whole milk or cream into fat and…

    • 225g plain flour
    • 150g golden caster sugar
    • 3 medium eggs (very important to use the correct size)
    • 1 tsp baking powder
      Baking powder

      Baking powder

      bay-king pow-dah

      Baking powder is a raising agent that is commonly used in cake-making. It is made from an alkali…

    • pinch of salt
    • 1 tsp vanilla extract
    • edible food colouring - red, orange, yellow, green, blue and purple, plus optional pink (see below)

    For the icing

    • 1 tsp vanilla extract
    • 3 x 250g tubs cream cheese or mascarpone
    • 350g icing sugar


    1. Heat oven to 180C/160C fan/gas 4. Grease 2 x 20cm round sandwich tins and line the bases with baking parchment. Tip all the sponge ingredients, apart from the food colouring, into a mixing bowl, then beat with an electric whisk until smooth.

    2. Working quickly, weigh the mixture into another bowl to work out the total weight, then weigh exactly half the mixture back into the mixing bowl. Pick 2 of your colours and stir a little into each mix. Keep going until you are happy with the colour – the colour of the batter now will be very similar to the finished cake, so be brave! Scrape the different batters into the tins, trying to spread and smooth as much as possible – but try not to waste a drop of the batter – a rubber spatula will help you. Bake on the same oven shelf for 12 mins until a skewer poked into the middle comes out clean.

    3. Gently turn the cakes out onto a wire rack to cool. Wash the tins and bowls thoroughly, and start again from step 1 – this time using another 2 colours. Unless you’re making the optional pink layer, repeat one more time to get 6 sponges, all of different colours. Leave them all to cool.

    4. To make the icing, very briefly beat the vanilla and cream cheese or mascarpone with an electric whisk until smooth. Sift in the icing sugar and gently fold in with a spatula. Be careful – the more you work it, the runnier it will get, increasing the chance of splitting.

    5. Smear a little icing on your cake stand or plate – just a splodge to stick the first sponge. Start with the red, then spread with some icing right to the very edge. Repeat, sandwiching on top the orange, yellow, green, blue and finally purple sponges. Spread the remaining icing thickly all over the sides and top of the cake. For more tips and expert advice on how to create the perfect rainbow cake, check out our tips, below.

    You may also like

    Comments, questions and tips

    Sign in or create your My Good Food account to join the discussion.
    3rd Oct, 2018
    I’d give this ZERO stars. Please don’t waste an afternoon on this. By all means get the correct food dyes (you’ll need them) but I just wasted eggs butter and sugar on 4 flat inedible thick pancakes. Vile. A waste of time. DONT MAKE THIS!!
    23rd Sep, 2018
    After reading some of the reviews was a bit put off making this cake, however when I read the tips and advice section I could see where others might have gone wrong. I myself originally went out and bought natural food colouring before reading in the tips section that gel colours work best. It explains that natural colour fades and alters the consistency of the mix. Following this advice my cakes turned out vibrant and as expected, although I've yet to ice it. Again reading in the tips for icing it said they encountered problems with consistency so used full fat cream cheese instead of low fat which worked better. I do think that this information needs to be included with the list of ingredients. I would definitely give the recipe a try and not be put off by reading other reviews. The proof is in the pudding, which I've yet to find out, hopefully it will go down well for McMillan coffee morning!
    Nathan Barnard's picture
    Nathan Barnard
    20th Sep, 2018
    This recipe is all wrong it’s dense with no air in it. I would suggest that the eggs and sugar are whipped to a pale light colour. Then add the soft butter then fold in the flour and vanilla. As for the icing don’t bother
    Christine W's picture
    Christine W
    14th Aug, 2018
    Spent £20 on this cake and it was awful. Colours all turned gray and brown, cheese icing tasted disgusting and impossible to spread and cake was lopsided as icing was slippery. Wouldn't recommend and research food colouring before buying as some reaction with baking soda to form brown.
    Georgina Greenwood's picture
    Georgina Greenwood
    14th Aug, 2018
    Glad I did a test run before my niece's birthday because the icing on this cake was TERRIBLE. I have no idea how BBC Good Food came up with the quantities beacuse it was far, far too runny. I trippled the amount of icing sugar and it was still a total mess. Will reattempt with regular buttercream. The sponge itself was fine, nothing special. It's obviously a cake more for the photos than the taste. It was worth investing in good quality food dye otherwise this cake is pointless and bland. Overall - not a great cake but looks impressive (or at least I hope it will once I sort out the icing situation)
    1st Aug, 2018
    I tried this recipe today and it was a complete disaster. I followed the instructions to the letter, checking that the oven was at the right temperature for the right length of time, but even so the cake layers have come out like pancakes, uncooked and inedible. Might this have been because I had to empty most of a tube of Waitrose food colouring into the cake mix, which would have altered the proportions? I also took great care not to overmix the cream cheese icing, but it was way too runny to use on the cake, so I had to bin it. Really disappointed!! How come the other cooks who have left comments had such success? Should I have left my cakes in for longer?
    Caroline Young's picture
    Caroline Young
    30th Jun, 2018
    I make cakes to order and have just made this cake for a friend having never made a rainbow cake before. It turned out beautifully! The layers do look thin when they come out of the tin, but they are just the right size when stacked together to make a large cake. I did not cut the tops to flatten them, but filled the gaps between layers at the edges with butter icing before covering in fondant icing. I had lots of compliments on the cake and it tasted wonderful!
    30th Jun, 2018
    Just baked this cake for the first time and I am really pleased with it, easy to make and looks impressive
    31st May, 2018
    This recipe DID NOT WORK AT ALL! I was appalled by the turn out of each pair of cakes. Dense pancakes! They only just doubled in size but seeing as there was barely enough mixture to cover the bottom of the pan I’m not surprised! I tried the last two with self raising flour and nothing changed. Next time I will stick to a sponge recipe that has the same amount of butter, flour and sugar!! The cream cheese icing was not good eaither! Really upset as I spent all day on it! Made me think I did something wrong but reading the comments, I will re think!
    Laura Bowker-ford
    18th May, 2018
    All of these bad comments are wrong, I've made this recipe many times and its a firm favourite with EVERYONE. I bake it for charity bake sales and any family party and its always gone really fast. I suspect the people who's failed maybe did it wrong or missed something out.


    green cupboard
    3rd Nov, 2015
    I know it is good because I have masked it be for
    goodfoodteam's picture
    9th Feb, 2015
    Hi Clairecutecake, thanks for getting in touch and really glad you're thinking of baking this cake. We haven't tested this recipe using a larger tin so for perfect results we would suggest purchasing the correct size tin as changing the size could alter the structure of the cake drastically. We're hestitant to give estimated quantities as we wouldn't want you to waste ingredients. 
    27th Nov, 2014
    Is it okay if I don't use the ..instead use baking powder...????
    14th Aug, 2014
    I have added gel food colouring to cake mix now looks curdled
    Comablackmm's picture
    2nd Sep, 2014
    Whenever you make a basic sponge recipe, use soft butter and cream it first. Then add the sugar and mix for a couple of minutes until well combined and it goes a lighter colour. Then add your eggs and mix very thoroughly for a further couple of minutes. Often the mixture does curdle a little in my experience, but if you have the flour ready weighed out, sift a little in and combine. This stops the curdling process. Then continue to add your flour. It shouldn't make any difference providing it'd not left in the curdled state for a long length of time. Hope this helps
    11th Aug, 2014
    Does the quantity for the cream cheese icing have to be x3 as well? Thanks
    Comablackmm's picture
    2nd Sep, 2014
    No, this is for the whole cake. You only have to treble the cake quantities to make the 6 layers. I would recommend having extra cream cheese as well as the 3 tubs of 250g, though, as hiding the beautiful colours underneath is quite challenging!
    4th Aug, 2014
    Having to type again as posted in comments incorrectly. My question is why is the recipe described as having buttercream when the icing uses cream cheese?
    Sarah Dimech
    14th Jun, 2014
    I need to know exactly the amount used for the purple colouring because it always comes out grey or at most very light purple. Last time I tried making a dozen cupcakes using Dr O's purple but I was not happy with the end result of the colour... can someone help me pls?
    11th Mar, 2014
    I want to make this cake for my other half, birthday is next week (18th March)... I only have this Friday off, but I was wondering, does anyone know how long this would last? 4 Days before the first slice is cut? Would that be ok? Thanks for any help or advice.


    Be the first to suggest a tip for this recipe...Got your own twist on this recipe? Or do you have suggestions for possible swaps and additions? We’d love to hear your ideas.
    Want to receive regular food and recipe web notifications from us?