Rainbow Cake Recipe
Introduction
This vibrant Rainbow Cake is a fun and festive treat perfect for any celebration. Layers of brightly colored, moist vanilla cake come together to create a stunning dessert that tastes as delightful as it looks.

Ingredients
- 2 1/2 cups all-purpose flour
- 1 1/2 cups granulated sugar
- 1 tbsp baking powder
- 1/2 tsp salt
- 1 cup unsalted butter, at room temperature
- 5 large eggs
- 2 tsp vanilla extract
- 1 cup milk
- Gel food coloring (red, orange, yellow, green, blue, purple)
Instructions
- Step 1: Preheat your oven to 350°F (175°C) and grease three 8-inch round cake pans to prevent sticking.
- Step 2: In a medium bowl, whisk together the flour, baking powder, and salt to combine the dry ingredients evenly.
- Step 3: In a separate large bowl, cream the butter and sugar together until the mixture is light and fluffy. Add the eggs one at a time, mixing well after each addition, then stir in the vanilla extract.
- Step 4: Gradually add the dry ingredients to the wet mixture, alternating with the milk, beginning and ending with the dry ingredients. Mix until just combined, avoiding overmixing.
- Step 5: Divide the batter evenly into six smaller bowls. Add a different gel food coloring to each bowl and stir until the color is uniform.
- Step 6: Starting with the red batter, layer each colored batter into the prepared pans in rainbow order—red, orange, yellow, green, blue, and purple.
- Step 7: Bake the cakes for 25 to 30 minutes, or until a toothpick inserted in the center comes out clean. Allow the cakes to cool completely before frosting and assembling.
Tips & Variations
- Use gel food coloring instead of liquid for brighter colors without thinning the batter.
- For extra moistness, add a tablespoon of sour cream or yogurt to the batter.
- Try layering the colors in a different order for a unique look.
- To make a single cake with visible rainbow layers, bake each color separately in thin layers and stack after cooling.
Storage
Store leftover cake covered tightly in the refrigerator for up to 4 days. Bring to room temperature before serving for best flavor. You can also freeze frosted cake slices wrapped well in plastic wrap and foil for up to 2 months; thaw overnight in the fridge.
How to Serve

Serve this delicious recipe with your favorite sides.
FAQs
Can I use liquid food coloring instead of gel?
While liquid food coloring works, it can thin the batter, resulting in less vibrant colors and potentially altering the texture. Gel food coloring is recommended for the best color intensity without affecting the consistency.
How do I make sure the colors stay bright after baking?
Using gel food coloring and avoiding overmixing the batter helps preserve the brightness. Also, bake the layers at the correct temperature and avoid overbaking, which can dull the colors.
Print
Rainbow Cake Recipe
- Total Time: 50-55 minutes
- Yield: 12 servings 1x
Description
This vibrant Rainbow Cake features six colorful layers of moist, fluffy vanilla cake, each tinted with bright gel food coloring to create a stunning visual effect. Perfect for celebrations and special occasions, this homemade cake is baked to perfection with a tender crumb and balanced sweetness, ready to be frosted and enjoyed by all.
Ingredients
Dry Ingredients
- 2 1/2 cups all-purpose flour
- 1 tbsp baking powder
- 1/2 tsp salt
Wet Ingredients
- 1 cup unsalted butter, at room temperature
- 1 1/2 cups granulated sugar
- 5 large eggs
- 2 tsp vanilla extract
- 1 cup milk
Other
- Gel food coloring (red, orange, yellow, green, blue, purple)
Instructions
- Preheat and Prepare Pans: Preheat your oven to 350°F (175°C). Grease three 8-inch round cake pans thoroughly to prevent sticking.
- Mix Dry Ingredients: In a medium bowl, whisk together the all-purpose flour, baking powder, and salt until well combined.
- Cream Butter and Sugar: In a large bowl, use an electric mixer to beat the room temperature butter and granulated sugar together until the mixture is light and fluffy. This usually takes about 3-5 minutes.
- Add Eggs and Vanilla: Add the eggs one at a time to the creamed butter and sugar, beating well after each addition. Then add the vanilla extract and mix until incorporated.
- Combine Dry and Wet Mixtures: Gradually add the dry ingredients to the wet mixture alternately with milk, starting and ending with the dry ingredients. Mix gently until just combined to avoid overmixing.
- Color the Batter: Divide the batter evenly into six separate bowls. Add a different gel food coloring to each bowl (red, orange, yellow, green, blue, and purple) and stir until the colors are vibrant and uniform.
- Assemble the Cake Layers: Layer the colored batters into the prepared pans in order, starting with the red batter at the bottom, followed by orange, yellow, green, blue, and ending with purple on top. If your pans are three, bake in batches or layer two colors per pan as preferred.
- Bake: Place the pans in the preheated oven and bake for 25 to 30 minutes. Check doneness by inserting a toothpick into the center of the cakes; it should come out clean.
- Cool: Remove the cakes from the oven and allow them to cool completely in the pans on a wire rack before frosting and assembling.
Notes
- Use gel food coloring for vibrant colors without thinning the batter.
- Ensure butter is at room temperature for easier creaming.
- Do not overmix the batter to keep the cake tender.
- If you don’t have three pans, bake layers in batches to avoid overcrowding the oven.
- Let cakes cool completely before frosting to prevent melting.
- Prep Time: 20 minutes
- Cook Time: 25-30 minutes
- Category: Dessert
- Method: Baking
- Cuisine: American
Keywords: rainbow cake, layered cake, colorful cake, vanilla cake, celebration cake, birthday cake

