Skip to Content

The Ultimate Rainbow Cake Recipe to Brighten Any Occasion

The Ultimate Rainbow Cake Recipe to Brighten Any Occasion

This Rainbow cake has vibrant layers of cake in the colors of the rainbow, and it’s as much a feast for the eyes as it is for the palate! Here’s how you can make your own rainbow cake:


  • Cake:
    • 2 1/2 cups all-purpose flour
    • 2 1/2 tsp baking powder
    • 1/2 tsp salt
    • 3/4 cup unsalted butter, softened
    • 1 1/2 cups sugar
    • 3 eggs
    • 1 tsp vanilla extract
    • 1 1/4 cups milk
    • Gel food coloring (red, orange, yellow, green, blue, indigo, violet)
  • Frosting:
    • 1 cup unsalted butter, softened
    • 4 cups powdered sugar
    • 1 tsp vanilla extract
    • 4 tbsp heavy cream


  • 6 or 7 round cake pans (depending on how many layers you want)
  • Mixing bowls
  • Electric mixer


  1. Preheat Oven and Prepare Pans:
    • Preheat your oven to 350°F (175°C). Grease the cake pans and line with parchment paper.
  2. Mix Dry Ingredients:
    • In a bowl, sift together flour, baking powder, and salt. Set aside.
  3. Cream Butter and Sugar:
    • In a large mixing bowl, cream the softened butter and sugar until light and fluffy. This usually takes about 3-4 minutes with an electric mixer.
  4. Add Eggs and Vanilla:
    • Add eggs one at a time, beating well after each addition. Stir in the vanilla extract.
  5. Combine With Dry Ingredients:
    • Alternately add the dry ingredients and milk to the butter mixture, starting and ending with the dry ingredients. Mix until just combined.
  6. Divide and Color:
    • Evenly divide the batter among different bowls for the number of colors you plan to use. Add gel food coloring to each bowl to create vibrant colors. Mix each one thoroughly.
  7. Bake:
    • Pour the colored batter into the prepared pans. Bake for 15-20 minutes or until a toothpick inserted into the center comes out clean. Let the cakes cool completely after baking.
  8. Make Frosting:
    • For the frosting, beat the butter until creamy. Gradually add powdered sugar, followed by vanilla and heavy cream. Beat until fluffy and spreadable.
  9. Assemble Cake:
    • Level the tops of the cakes if necessary. Place the first layer on a cake stand or plate, spread frosting over the top, and then add the next layer. Repeat with all layers, following the order of the rainbow colors.
  10. Frost and Decorate:
    • Apply a thin crumb coat of frosting around the entire cake. Chill for 30 minutes, then apply a final thick layer of frosting. Smooth the sides and top with a spatula.
  11. Serve:
    • Slice and serve the cake. Each slice will display the beautiful rainbow layers!

Feel free to decorate the cake with sprinkles, edible glitter, or any other festive decorations to enhance its rainbow theme!