This post may contain affiliate links. Please read our disclosure policy.
This rainbow cake is bright, fun, and guaranteed to steal the show at any celebration. With vibrant layers of color and fluffy buttercream frosting in every bite, it’s just as delicious as it is stunning!
For another reader-favorite cake recipe, try my Homemade Chocolate Cake or Copycat Portillo’s Chocolate Cake!

Why you’ll love this rainbow birthday cake recipe!

A classic rainbow birthday cake is all about creating a fun surprise inside. From the outside, it looks like a simple frosted cake—but once you slice into it, the colorful layers are revealed, making it extra special.
This cake keeps things simple on the flavor side with a vanilla base and creamy buttercream frosting, allowing the vibrant colors to take center stage. It’s the perfect combination of playful and delicious.
- A True Showstopper: This cake looks absolutely incredible when sliced, revealing colorful layers that instantly wow guests at birthdays, parties, or special occasions.
- Surprisingly Easy to Make: While it may look complicated, this recipe uses a simple boxed cake mix base, making it approachable even for beginner bakers.
- Soft and Moist Texture: Thanks to the addition of sour cream and oil, each layer is incredibly fluffy, tender, and full of moisture.
- Perfect for Celebrations: Whether it’s a birthday, holiday, or just a fun weekend bake, this cake brings instant joy to any table.
- Customizable Colors and Flavors: You can switch up the colors, add flavors, or decorate it however you like to match your theme.
Table of Contents
Ingredient Notes

See recipe card below this post for ingredient quantities and full instructions for this rainbow birthday cake.
- White cake mix – The white cake will hold the food coloring the best.
- Vegetable oil – Keeps the cake moist and tender.
- Sour cream – Adds richness and improves texture.
- Eggs – Helps bind the batter and create structure.
- Gel food coloring – Provides bold, vibrant colors for each layer.
- Buttercream frosting (this Homemade Cream Cheese Frosting recipe would also work!)
Variations
- Change the Colors: Customize the layers to match a party theme or holiday.
- Add Flavoring: Mix in vanilla, almond, or citrus extract for extra flavor.
- Use Cream Cheese Frosting: For a tangier twist, swap buttercream for cream cheese frosting.
- Make Cupcakes Instead: Divide the batter into cupcake liners for mini rainbow treats.
- Add Sprinkles: Mix sprinkles into the batter or use them for decoration. Perfect for a rainbow birthday cake!
How to Make a Rainbow Cake

- Prepare the batter: In a large bowl, mix the cake mix with oil, sour cream, eggs, and water until smooth.

- Divide and color: Split the batter evenly into six bowls and add different food coloring to each one. Pour each colored batter into separate greased cake pans.

- Bake the layers: Bake until a toothpick inserted in the center comes out clean, then let the cakes cool completely.

- Make the frosting: Prepare your buttercream while the cakes cool.

- Assemble the cake: Stack the layers with frosting between each one, starting from the bottom and working your way up.

- Crumb coat and finish: Apply a thin crumb coat, chill, then frost the entire cake and decorate as desired.

How to Store Rainbow Cake
Room Temperature: Store this rainbow layer cake in an airtight container for up to 2 days.
Refrigerator: Keep refrigerated for up to 1 week.
Freezer: Freeze slices or whole layers for up to 3 months. Thaw before serving.
Frequently Asked Questions
A rainbow color cake typically tastes like a classic vanilla cake with buttercream frosting. The flavor is simple and delicious, letting the visual appeal shine.
A rainbow layer cake is made by stacking multiple colored cake layers, usually in the colors of the rainbow, to create a vibrant, striped effect when sliced.
Using gel food coloring is the key. It produces bold, vivid colors without affecting the texture of the batter.
Yes! You can bake the layers in batches if you don’t have enough pans.
More Cake Recipes You’ll Love
💌 Love easy recipes? Join my newsletter and get my Top 10 Reader-Favorite Recipes eBook FREE! Sign up here.
Need help with this recipe?
Click the buttons below to summarize it, adjust for diets, swap ingredients, or ask your own questions!

Rainbow Layer Cake
Ingredients
- 2 boxes white cake mix
- 1 cup water
- 1 cup vegetable oil
- 16 oz sour cream
- gel food coloring
- 4 eggs
Instructions
- Preheat the oven to the temperature on the back of the cake box. Prepare and grease the cake pans. Set aside.
- In a large bowl, combine the cake mix, water, vegetable oil, sour cream, and eggs. Mix well to combine.
- Evenly distribute the batter into six bowls to make all of the colors. Add the desired amount of food coloring to each bowl and mix until the color is smooth.
- Add the batter to the pan for each color and bake according to the package on the back of the cake mix box.
- Let the cake cool completely before frosting the cake with buttercream frosting. Frost the cake, first with a crumb coat, and then with the remaining frosting. Top with sprinkles if desired.














This turned out perfectly and my kids LOVED the colored layers!