This post may contain affiliate sales links. Please see my full disclosure policy for details
These Rainbow Cupcakes are bright, colorful, and certain to brighten anyone’s day! With a yellow cupcake base and rainbow buttercream frosting, these cupcakes are made entirely from scratch.
The Best Rainbow Frosted Cupcakes
After making my rainbow cake, I just had to try the cupcake version. Of all the cupcakes I’ve made, these rainbow swirl cupcakes may be the most joy-inducing. I mean, how can you look at these and not smile These cupcakes are bright, colorful, and fun. Perfect for spring, summer, and any other occasion.
These rainbow cupcakes begin with my classic yellow cupcakes. The batter is thicker than my vanilla cake, which is important when working with multiple colors. If the batter is too thin, the colors of the batter tend to get muddy and run together.
Then they’re topped with rainbow buttercream, which is simply my vanilla buttercream with gel coloring. There will be quite a bit of frosting leftover, but it’s easier to have leftover frosting than it is to run out of frosting!
What You’ll Need
These rainbow cupcakes use your standard yellow cupcake ingredients, with the addition of some gel food coloring.
For the cupcakes:
- Granulated sugar
- Vegetable oil
- Unsalted butter
- Eggs – You’ll need 2 eggs plus 2 egg yolks.
- Pure vanilla extract
- Sour cream – Sour cream helps to keep the cupcakes moist. If you don’t have it, you can replace with non-fat Greek yogurt.
- All-purpose flour
- Baking powder & baking soda
- Buttermilk – I prefer buttermilk for the flavor it adds. Plus it helps keep the crumb tender. However, you can also use regular milk if desired or make this homemade substitute.
- Gel color
For the Frosting
- Unsalted butter – The butter should be cold when you begin making the frosting.
- Powdered sugar
- Vanilla extract
- Heavy whipping cream – You can also use milk but I find the heavy whipping cream makes the frosting lighter and fluffier.
- Pinch of salt – Optional but helps to balance the sweetness.
- Gel colors
- Gold gitter stars
What’s The Best Food Coloring To Use for Frosting?
Gel coloring, not traditional food coloring, is the best option for dying both the frosting and the cupcakes. Chefmaster, Americolor, and Wilton are all great brands to use. Wilton has fewer color options, which makes it difficult to achieve the purple and teal colors but is a good option if you don’t want to buy individual colors. Since we’re going for the pastel color effect, you’ll only need a small drop of each.
I personally used Chef Master gel colors for these rainbow cupcakes and frosting. The colors I chose were Lemon Yellow, Neon Pink, Teal Green, Neon Brite Green, Sunset Orange, and Purple.
How to Make Rainbow Cupcakes
Both the cupcake portion and frosting of these rainbow icing cupcakes come together easily. Just remember to leave plenty of time for the cupcakes to cool before adding the frosting.
For the cupcakes:
- Make the batter: Beat the sugar, oil, eggs and egg yolks, and vanilla extract until everything is incorporated and the batter is lighter in color. Mix in the sour cream until combined.
- Add in the dry ingredients: In a separate bowl, combine the remaining dry ingredients. Alternative adding half of the dry ingredients with half of the buttermilk at a time until it’s all been added and finish mixing until well combined.
- Add the food coloring. Divide the batter into 6 bowls. Add a drop of gel color into each one and mix to combine. Drop 2 teaspoons of each color batter into each liner. You can do a little bit of each color or randomly mix them up. Just be sure they’re filled about 2/3 full and you have 24 cupcakes.
- Bake. Bake at 350F for 14 to 16 minutes. Don’t forget to test them with a toothpick. Remove from the oven and cool completely.
For the frosting:
- Whip the butter. Cut the butter into pieces and whip for 5 to 7 minutes, until the butter is light in color.
- Add the other ingredients. Alternate adding 2 cups of powdered sugar at a time with the vanilla extract and heavy cream. Once everything has been adding, increase the speed and beat for another 3 to 5 minutes. If you need a more indepth tutorial, visit my original vanilla buttercream.
- Add the food coloring. Set aside a cup of undyed frosting. Divide the remaining into 6 bowls. Add a drop of gel coloring to each one.
- Assemble the piping bag. Place each color in its own piping bag. Then pipe a thick row of each color on a piece of plastic wrap. If you want to do this without. piping bag, you can use a spoon or knife to spread the frosting on the plastic wrap. Fold tightly, twist one end and cut the tip off. Drop the plastic wrap into a piping bag fitting with a French star tip. Fill a smaller piping bag with the white frosting.
- Add the rainbow frosting. Pipe a circle of rainbow frosting starting from the outside edge and working your way into the middle.
- Add the white frosting. Add 4 to 5 dots of white frosting. Garnish with gold stars.
Tips for the Best Frosted Cupcakes
These rainbow cupcakes with buttercream frosting are easy to make but there are a few key tips to making the best cupcakes possible.
- Don’t add to much coloring. You just need a drop or two, especially if you’re going for the pastel color look.
- Use cold butter for the frosting. I always use cold butter when making buttercream frosting. The longer you whip the butter, the fluffier the frosting will be and starting with cold butter ensures extra whipping time.
- Use heavy whipping cream. The perfect frosting is sweet but not overly so, while still being light and fluffy. Using heavy whipping cream instead of regular milk will help you achieve that.
- Can I make the frosting less sweet? While technically you can use less powdered sugar, it will affect the texture of the frosting and give it a more buttery flavor and texture. Instead, what I recommend doing is adding a pinch of salt or a splash of heavy whipping cream to balance the sweetness.
Can I Use This Recipe to Make a Cake?
Yes, this rainbow cupcake recipe can be used to make a rainbow cake. You’ll have enough batter for one 9x13inch pan or three 8-inch cakes, perfect for making a layer cake. You’ll easily have enough frosting for a cake as well.
Can I Freeze These?
I recommend freezing these cupcakes unfrosted. To freeze cupcakes, flash freeze them on a baking sheet. Then transfer to an airtight, freezer-safe container for up to 1 month. Defrost to room temperature then add your frosting.
You can also freeze the buttercream frosting for up to a month, in a Ziploc bag. Defrost and then whip for a few minutes to get the light and fluffy texture back. You will want to freeze the undyed frosting if possible, so you can rewhip it and then color it.
How to Store
Frosted rainbow cupcakes can be stored at room temperature, in an airtight container, for up to 3 days. Unfrosted cupcakes will last for 4 days. They should be stored in a cool place, outside of sunlight. If you live in a hot and humid area, you can also store them in the fridge.
You’ll likely have leftover frosting, which can be stored in the fridge for up to 7 days. You can also freeze it in a Ziploc bag for up to a month. In either case, you’ll likely want to rewhip it before frosting your cupcakes or cake, to retain the light and fluffy texture.
More Cupcake Recipes:
- Easy Coconut Cream Pie Cupcakes
- Red Velvet Cupcakes
- Apple Pie Cupcakes
- Lemon Cupcakes
- Coffee Cake Snickerdoodle Cupcakes
- Prep Time: 60 minutes
- Cook Time: 15 minutes
- Total Time: 1 hour 15 minutes
- Yield: 24 cupcakes
These Rainbow Cupcakes are bright, colorful, and certain to brighten anyone’s day! With a yellow cupcake base and rainbow buttercream frosting, these cupcakes are made entirely from scratch!
For the cake:
- 1 ½ cups (285g) granulated sugar
- ½ cup (118 ml) vegetable oil
- 2 tablespoons (28g) unsalted butter, melted
- 2 large eggs
- 2 egg yolks
- 1 tablespoon (15ml) pure vanilla extract
- 1/2 cup (118ml) sour cream
- 2 ½ cups (350g) all-purpose flour
- 2 teaspoons (7.5g) baking powder
- 1 teaspoon (4g) baking soda
- 1 teaspoon (5g) salt
- 1 1/3 cup (315ml) buttermilk or milk
- Gel color for dying batter (see recipe notes)
For the Frosting
- 2 cups (452 g) unsalted butter, cold.
- 7 cups (911 g) powdered sugar
- 1 tablespoon (15 ml) pure vanilla extract
- 2-3 tablespoons (30ml) heavy whipping cream (or milk)
- Pinch of salt (optional)
- Gel colors for dying frosting (see recipe notes)
- Gold glitter stars
For the cupcakes:
- Preheat the oven to 350°F. Line a cupcake pan with cupcake liners.
- In a large mixing bowl, combine the sugar, vegetable oil, butter, eggs and egg yolks and vanilla extract. Beat on medium speed until the eggs and oil are well incorporated and the batter is lighter in color, about 2 minutes. Scrape down the bowl as needed. Next mix in the sour cream and beat until well combined.
- In a separate bowl, combine the remaining dry ingredients. Alternate adding half the dry ingredients and half the buttermilk at a time and mix just until the flour starts to incorporate. Then add remaining dry ingredients and buttermilk and beat until well combined. Use a spatula to scrape down the sides of the bowl and stir the batter from the bottom to the top to ensure it’s well mixed.
- Divide the batter into 6 bowls, about ¾ cups of batter per bowl. Dye each one with just a drop of gel color and mix to combine.
- Drop about 2 teaspoons of batter per color in each liner. It should be filled about 2/3 full. Bake at 350°F for 14-16 minutes. Test the cupcakes for doneness by inserting a toothpick into the center of the cupcake. If the toothpick comes out clean, the cupcakes are done. Cool Completely.
For the frosting
- Cut butter into pieces. Using the paddle attachment, whip the butter for 5-7 minutes, scraping down the bowl occasionally. Beat until the butter looks light in color.
- Alternate adding 2 cups of powdered sugar at a time with the liquid ingredients: vanilla extract & heavy cream. Ensure the powdered sugar is well combined, then and whip for 1-2 minutes before adding more powdered sugar. Repeat until all ingredients are added.
- Once all the powdered sugar has been added, increase speed to medium-high and beat for another 3-5 minutes to whip additional air into the frosting.
- Set aside 1 cup of undyed frosting. Then divide the remaining frosting into 6 bowls, about ½ cup each. Dye each of the 6 colors and then place each color into its own piping bag.
- Lay out a piece of plastic wrap, pipe a thick row of each color of frosting side-by-side onto the clear wrap. Fold the plastic wrap up and tightly roll, twist one end and cut the tip off. Drop the plastic wrap into a piping bag fitted with an Ateco 6B (or any French Star Tip).
- Fill a smaller piping bag fitted with a size 12 or another large open round tip and fill with the white frosting.
- With the rainbow frosting, pipe a circle starting from the outside edge and work your way into the middle. Dot the top of the frosting with 4-5 dots of white frosting. Garnish with gold stars.
Colors used: You can use Chefmaster, Americolor or Wilton gel colors. Wilton has less color options and it’s more difficult to achieve the purple or teal color. But it’s a great option if you don’t want to buy individual colors. The same colors are used for the batter and the frosting. You only need a small drop of each for the pastel color effect. For this, I used Chef Master. Lemon Yellow, Neon Pink, Teal Green, Neon Brite Green, Sunset Orange, Purple.
- Buttermilk: I prefer buttermilk for the flavor it adds. Plus it helps keep the crumb tender. However, you can also use regular milk if desired or make this homemade substitute.
- Sour Cream: use plain or Greek yogurt instead
- Category: Dessert
- Method: Baking
- Cuisine: American
Keywords: frosted cupcakes, rainbow swirl cupcakes, rainbow icing cupcakes