Back to Cakes

Rainbow Layer Cake Recipe

Rainbow Layer Cake Recipe
Dessert Recipes Kitchen 12 June 2025

A rainbow layer cake is made from six thin layers of vanilla sponge, each coloured a different shade of the rainbow, stacked with vanilla buttercream and covered in white icing. From the outside it looks simple, but when you cut the first slice, the bright stripes are revealed. It is a joyful centrepiece for children's birthdays, Pride celebrations and any party that needs a burst of colour.

Which food colouring should you use?

Use gel colouring rather than liquid food colouring. Gels are highly concentrated, so a small amount gives a vivid colour without thinning the batter. Liquid colours are much weaker; you would need so much that the sponge becomes wet and the colours look pale and muddy after baking. Add the gel with a cocktail stick, a little at a time, until each batter is slightly brighter than you want, as colours fade a little in the oven.

How do you bake six even layers?

Weigh the whole bowl of batter, subtract the weight of the empty bowl, and divide by six so every layer has exactly the same amount. Most people have only two or three sandwich tins, so bake the layers in batches, washing and relining the tins in between. Keep the coloured batters covered while they wait. Thin layers bake quickly, so watch them closely.

What ingredients do you need?

For the sponge

  • 450g unsalted butter, softened
  • 450g caster sugar
  • 8 large eggs, at room temperature
  • 450g self-raising flour
  • 2 tsp baking powder
  • 2 tsp vanilla extract
  • 4 tbsp milk
  • Red, orange, yellow, green, blue and purple gel colouring

For the buttercream

  • 350g unsalted butter, very soft
  • 700g icing sugar
  • 2 tsp vanilla extract
  • 3 to 4 tbsp milk

How do you make a rainbow cake?

  1. Heat the oven to 180°C (160°C fan), gas 4. Grease 20cm sandwich tins and line the bases.
  2. Beat the butter and sugar until pale and fluffy, then beat in the eggs one at a time.
  3. Fold in the flour, baking powder, vanilla and milk until smooth.
  4. Divide the vanilla sponge mixture equally between six bowls.
  5. Colour each bowl with a different gel, stirring until even.
  6. Spread each batter into a prepared tin and bake for 12 to 15 minutes, until just springy. Do not let them brown.
  7. Cool completely on a wire rack.
  8. For the vanilla buttercream, beat the butter until pale, then beat in the icing sugar, vanilla and milk until light.
  9. Stack the layers from purple at the bottom to red at the top, spreading buttercream between each.
  10. Crumb coat, chill for 30 minutes, then cover with the remaining buttercream.

Stop the colours browning: bake the layers only until springy and just pulling from the sides. Overbaked layers develop brown edges that dull the bright colours.

Why are my colours dull?

Dull colours usually mean too little colouring, liquid colouring rather than gel, or overbaked layers with browned edges. Yellow butter can also affect the shades, especially blue and purple; beating the butter very well until it is pale helps. For the brightest results, use strong gels and bake the layers gently.

How do you decorate a rainbow cake?

Many people keep the outside plain white so the rainbow is a surprise when cut. Alternatively, cover it in rainbow sprinkles, pipe coloured buttercream swirls around the top, or add a few pieces of the coloured sponge crumbled on top as a hint of what is inside.

Can you make it ahead?

Yes. The sponges can be baked and frozen for up to a month, wrapped individually. Defrost them before assembling. The finished cake keeps for three days in a cool room. Serve at room temperature.

How many does it serve?

A six-layer 20cm rainbow cake is tall, so it serves 20 to 24 people in generous slices, or more if cut into thin wedges.

Can you use natural food colouring?

Natural colourings made from ingredients such as beetroot, spirulina and turmeric are available, but they give softer, pastel shades rather than vivid rainbow colours. Some can also add a slight flavour or fade in the oven. They work well for a gentle pastel rainbow, but for bright, bold stripes, gel colouring is the more reliable choice.