My rainbow cupcakes are made from a cake mix base with a few intentional upgrades that make the cupcakes taste homemade. They bake up soft with clearly defined color layers. This is the kind of recipe you pull out for birthdays, school parties, Pride celebrations, or anytime you want something playful that doesn't require advanced baking skills or specialty tools. There's also an easy gluten-free option, so everyone at the table can grab one.

Save This Recipe!
Skill Level: Beginner
Shortcut Central: You can use store-bought frosting for quick and easy decorating.
Flavor Remix: Swap vanilla for almond extract or add citrus zest to the batter.
Allergy Watch: Gluten-Free Option, Dairy-Free Option, Nut-Free
I love a fun rainbow cake. I also don't have the patience to weigh out all the batter and create perfect layers. Because these are cupcakes, not a layered cake, there's no weighing or leveling involved. You can eyeball the batter and still end up with colorful stripes.
Using a cake mix removes a lot of the guesswork while still delivering consistent results. Butter replaces oil for better structure and flavor, and an extra egg yolk helps keep the crumb tender. You can also use my gluten free vanilla cake as a base.
Gel food coloring creates bold, saturated layers that stay vibrant after baking. You can also color the buttercream frosting or keep it white and add sprinkles.
Ingredient Notes
- Cake Mix: You can use any regular or gluten free cake mix. The quantities are for a 22 ounce box but I put a 15 ounce version in the notes of the recipe card. I prefer the taste of yellow cake but you can use white cake mix.
- Milk: Dairy or plant-based milk both work. Choose something neutral so it doesn't compete with the vanilla flavor.
- Butter: Use regular or dairy free.
- Vanilla Extract: Or use an equal amount of vanilla paste.
- Food Coloring- Gel is preferred and will result in better colors but you can use powdered or water-based if you prefer.
- Cocoa Powder- Just a splash or cocoa powder in the red batter enhances the color.

How to Make Rainbow Cupcakes
A step-by-step visual guide for making rainbow cupcakes. You can skip to the recipe for the full written instructions.

Make the Batter
Creaming the butter makes the batter light.

Color the Cake Batter
Divide the batter into six bowls. Precision isn't required here. Color each portion, adjusting until the shade looks slightly darker than you want. Colors soften a bit as they bake.

Fill the Cupcake Tin
Layer about 1-½ teaspoons of each color into the cupcake liners, starting with purple and ending with red. Let the filled pan rest for 10 minutes before baking.

Bake
Bake until a toothpick inserted in the center comes out clean. Cool completely before frosting.
Recipe Tips
- For the most even bake, only fill every other cupcake well if you have the space.
- Use room-temperature eggs so they blend smoothly into the butter
Make Ahead and Storing
Make Ahead: Bake the cupcakes one day ahead and store unfrosted.
Storing: Refrigerate frosted cupcakes for up to 2 days.
Freezing: Do not freeze.
📖 Recipe

Rainbow Cupcakes from Cake Mix
Save This Recipe!
Ingredients
- 1 box yellow cake mix (regular or gluten free) or use white cake mix (22 ounce box)
- ½ cup unsalted butter softened
- 4 eggs
- ⅔ cup milk
- 1 teaspoon vanilla extract
- Gel food coloring Red orange, yellow, green, blue, purple
- 1 teaspoon unsweetened cocoa powder
- Vanilla Buttercream Frosting
- ¼ cup rainbow sprinkles
Instructions
- Preheat the oven to 350 F degrees. Line a cupcake tin with muffin liners.
- In a large mixing bowl, beat the butter for 2 minutes. Add the eggs, milk, and vanilla. Mix until smooth.
- Slowly add cake mix and mix until just combined.
- Equally divide batter into 6 separate bowls. Add a 4 to 6 drops of gel color ( a different color in each bowl) and mix each batter until color is evenly distributed. Add more gel as needed to get a vibrant color. Add the cocoa powder to the red bowl for a richer color.
- Using a small spoon add a teaspoon of each color to the cupcake liners starting with purple and ending with red.
- Bake at 350 degrees F for 16-20 minutes or until an inserted toothpick in the center comes out clean. Cool on rack.
- Frost once totally cool and top with sprinkls.
Equipment
- cupcake liners
- cupcake tin
Notes
- For a 15 ounce box of cake mix use 3 eggs, ⅓ cup of butter, and ½ cup of milk.
- To make this recipe dairy-free use non-dairy milk.
- To make a marbled rainbow cake: Grease a baking pan (size and baking times should be according to box). Color the batter according to the directions above. Scoop the batter into the cake pan, alternating colors. Rest for 10 minutes before baking. The rainbow cake will have a swirled pattern rather than layers.
Nutrition
This recipe originally appeared on my website Peel with Zeal.














Comments
No Comments