Homemade Rainbow Cupcakes Recipe

There's no doubt that classic cupcakes are great for any occasion. Whether you're serving them for a birthday party or an anniversary celebration, cupcakes are the ideal go-to dessert. But what if you could take a simple homemade cupcake recipe and kick it up a notch? Now you can with these incredibly colorful cupcakes.

Rainbow cupcakes are the perfect splash of color to add to any celebration. You can opt to include a full rainbow of six colors or only choose a select few. Want even more customization? Choose different hues of each color rather than your classic primary options. It's all up to your creativity.

With simple ingredients, you can bake these exciting cupcakes from scratch. Color the batter, along with the frosting, to create the ultimate rainbow display. And of course, don't forget to top them with rainbow sprinkles to make these fun and festive rainbow cupcakes that much better. 

Gather the ingredients for rainbow cupcakes

Ready to get started on making this colorful cupcakes recipe? First, grab all of your ingredients. For this rainbow cupcakes recipe, you'll need white sugar, flour, baking powder, baking soda, salt, two eggs, oil, milk, and pure vanilla extract. For the frosting, you'll also need one stick of butter and powdered sugar. And of course, you'll need a rainbow of food coloring along with your favorite rainbow sprinkles.

Mix the dry ingredients

Once your ingredients are gathered, you're ready to get to baking. First, preheat the oven to 350 F.

Next up, add all of the dry ingredients into a mixing bowl. Add the flour, sugar, baking soda, baking powder, and salt. Use a hand mixer to mix the dry ingredients until combined. Be sure the mixture is free of any large clumps before moving on to the next step.

Add the wet ingredients to finish the batter

With the dry ingredients mixed together, it's time to add the wet ingredients. Add in the two eggs, one at a time. Once the eggs are mixed in, add in the milk and mix. Last, mix in the oil and vanilla extract.

Mix the cake batter until just combined. Be sure not to overmix the batter so you don't end up with dry cupcakes.

Color and bake the cupcakes

Once the cupcake batter is ready, divide it into six different bowls. You'll want about half a cup of batter in each bowl. Use food coloring to dye each section of batter.

Line a cupcake pan with paper liners, and use a spoon to scoop a small amount of each color of batter into each cupcake well. It's best to start with purple and work your way to red, filling each cupcake well about halfway full.

Once prepped, bake the cupcakes for 18 minutes until the tops are set. When fully baked, remove the cupcakes from the oven and set them aside to completely cool while you make the frosting.

Frost the rainbow cupcakes

While the cupcakes are cooling, make the frosting. Put the softened butter into a mixing bowl. Cream the butter and add in two cups of powdered sugar. Mix the butter and sugar, add in the milk and vanilla extract, and mix again. Gradually mix in the remaining powdered sugar until the frosting forms. Once the frosting has formed, turn the speed up on the mixer to mix it until fluffy.

Once the cupcakes are fully cooled, pipe the cupcakes with white frosting. If you'd prefer rainbow frosting, add food coloring. To create a rainbow effect, divide the frosting into multiple bowls. Color each bowl of the frosting as desired. Add a spoonful of each color, alternating between, to a piping bag, and pipe the cupcakes with the rainbow frosting. Decorate the rainbow cupcakes with your favorite rainbow sprinkles to finish them off.

Homemade Rainbow Cupcakes Recipe
5 from 18 ratings
What if you could take a simple homemade cupcake recipe and kick it up a notch? Now you can with these incredibly colorful cupcakes.
Prep Time
20
minutes
Cook Time
18
minutes
Servings
12
cupcakes
rainbow cupcakes
Total time: 38 minutes
Ingredients
  • 1 cup white sugar
  • 1 cup flour
  • 1 teaspoon baking powder
  • ½ teaspoon baking soda
  • ½ teaspoon salt
  • 2 eggs
  • ¼ cup oil
  • ½ cup milk (plus 2 tablespoons for frosting)
  • 1 teaspoon pure vanilla extract (plus 1 teaspoon for frosting)
  • ½ cup butter, softened
  • 5 to 6 cups powdered sugar
  • Food coloring in a variety of colors
Optional Ingredients
  • Rainbow sprinkles
Directions
  1. Preheat the oven to 350 F. In a large mixing bowl, add the white sugar, flour, baking powder, baking soda, and salt. Mix to combine.
  2. Mix in the eggs one at a time. Mix in the oil, milk, and vanilla extract.
  3. Divide the batter into six different bowls, about ½ cup each. Use food coloring to color the batter in each bowl.
  4. Prepare a cupcake pan with paper liners. Use a spoon to scoop a bit of each color into each cupcake well. Start with purple and work your way to red. Each cupcake well should be just about halfway full.
  5. Bake the cupcakes for 18 minutes until the tops are set. Once baked, remove from the oven and set aside to completely cool.
  6. To make the frosting, add the softened butter into a mixing bowl. Cream the butter and add 2 cups of powdered sugar. Mix, add in the milk and vanilla extract, and mix again. Gradually mix in the remaining powdered sugar until the frosting forms. Turn the speed up on the mixer to mix until fluffy.
  7. Pipe the cupcakes with white frosting, or choose to add food coloring. To create a rainbow effect, divide the frosting into multiple bowls. Color the frosting. Add a spoonful of each color, alternating between, to a piping bag. Pipe the cupcakes with frosting, and decorate with rainbow sprinkles.
Nutrition
Calories per Serving 442
Total Fat 13.3 g
Saturated Fat 5.6 g
Trans Fat 0.3 g
Cholesterol 48.0 mg
Total Carbohydrates 80.2 g
Dietary Fiber 0.3 g
Total Sugars 71.0 g
Sodium 196.7 mg
Protein 2.4 g
The information shown is Edamam’s estimate based on available ingredients and preparation. It should not be considered a substitute for a professional nutritionist’s advice.
Rate this recipe