Celebrate St. Patrick’s Day (or any other occasion!) by making these festive tie-dye rainbow cupcakes! This easy cupcake recipe is fun to make for a delicious, colorful sweet treat made from scratch!

Colorful desserts are fun to make, and they never fail to bring a smile. Especially kids - they absolutely love them! Just like red velvet cupcakes are perfect for Valentine's Day, rainbow cupcakes are the best St. Patrick's Day dessert!
The light and fluffy frosting with colored sprinkles is like like the pot of gold at the end of the leprechaun's rainbow!
Why You'll Love This Recipe
- Made from scratch for the best flavor. A lot of the other recipes for rainbow and tie dye cupcakes start with a boxed cake mix. Of course they're convenient, but the flavor of cupcakes made from scratch just can't be beat!
- Freezer friendly. If you need to make a lot of them, you can save time by making them ahead. Unfrosted, they freeze well for a couple of months.
- Easy to adapt. You can use this same technique to make a 9-inch rainbow cake.
- Perfect for themed parties. Is your kiddo having a tie dye birthday party?

With layers of rainbow colors, you might think that this recipe is going to be a challenge. It may look difficult, but it's really very simple!
You'll start by making batter using my simple white cake recipe. Then, you'll separate it into different bowls, add a different color to each, then bake them together in a muffin tin. Easy and fun!
Ingredients
See ingredient substitutions in the next section. ⬇️
To make the tie dye cupcakes, you'll need:
- unsalted butter: If you can afford it, I recommend using European butter rather than American-made. It has more butterfat, so the flavor is much better.
- white granulated sugar
- large eggs
- vanilla extract
- all-purpose flour
- baking powder: This is the leavener, which is what causes the cakes to rise. Most leaveners stay active for about 6 months. If you haven't used yours recently, it's best to test it for freshness.
- sea salt: It may not seem like it matters, but salt helps balance out the sweetness from the sugar. Without it, the dessert can be too sweet to enjoy.
- milk: Whole milk will add a rich flavor and tenderness to the cupcakes.
- food coloring: You can use either liquid or gel food coloring. As you can see in the photo below, I used liquid this time. I think gel food coloring creates better color, and because it's concentrated, you won't use as much.
📖 Time-Saving Tip - Testing Baking Soda or Baking Powder for Freshness
This simple little test can save you time and money, because if your leavener is expired, whatever you're baking wont rise in the oven! This test works for baking soda and baking powder:
- Add about ½ teaspoon of baking soda or powder to a small bowl. Stir in an equal amount of an acidic ingredient, like vinegar or citrus juice.
- If the solution doesn't start to bubble immediately, it's time to replace your leavener.

Substitutions and Recipe Variations
- all-purpose flour: For a softer crumb, you can use cake flour instead. If you'd like to make gluten-free cupcakes, substitute the AP flour with any cup-for-cup variety of gluten-free all-purpose flour. Two popular brands are Bob's Red Mill and King Arthur Flour.
- baking powder: If you happen to be out of baking powder, but you have baking soda and cream of tartar on hand, you can make a baking powder substitute!
To use baking soda as a substitute for baking powder, mix ½ teaspoon of cream of tartar with ¼ teaspoon of baking soda for every 1 teaspoon of baking powder. - white granulated sugar: To reduce the calories, you can substitute the sugar with any cup-for-cup variety of granulated sugar substitute. Monk fruit sugar is a good option. Coconut sugar is also a good substitute.
- salted butter: If you need or want to use unsalted butter, just whisk ¼ teaspoon of salt into the flour.
I haven't made rainbow cupcakes using butter substitutes, but I can't think of a reason why they won't work. - eggs: Egg yolks are important for creating moisture and structure. If you have to use a substitute, see my post on good egg substitutes for cake mix.
- vanilla extract: Almond extract and lemon extract are both good substitutes for vanilla. If you need or want to omit the extract, that's fine too. For additional vanilla flavor, you can use vanilla bean paste. If you need an alcohol-free flavoring, you can use vanilla essence.
- Whole milk: While I recommend whole milk, any type of dairy or non-dairy milk will work.
How to Make Rainbow Cupcakes
Summary only. The complete recipe instructions are in the card at the bottom of this post ⬇️

- Combine sugar, butter, and eggs.

- Incorporate the dry ingredients.

- Stir in the milk to create a smooth batter.

- Divide cake batter into separate bowls.

- Add rainbow colors or tie dye colors

- Layer in a little of each colored batter.

- Bake and cool the tie dye cupcakes, then frost or decorate as you wish!
Liz's Tips for the Best Cupcakes
- Use paper liners to prevent the cupcakes from sticking to the pan.
- Avoid over mixing the batter.
- How much of each colored batter to add isn't important. Just have fun!
How to Make a Tie Dye or Rainbow Cupcake Effect
Thankfully, making the colored layers doesn't have to be done in any particular way. When color has been added to the batter, it's time to fill the wells of the muffin pan.
How you go about this is completely up to you. If you're trying to make a rainbow effect, make the layers in this order:
- Violet (purple)
- Indigo (blue)
- Blue
- Green
- Yellow
- Orange
- Red
Decorating the Cupcakes
You can decorate the tops with swirls of store-bought frosting, homemade buttercream, or even cream cheese frosting.
If you want to take things up another festive notch, make some rainbow buttercream frosting!
- For rainbow frosting, make (or buy) a large batch of your favorite cream cheese frosting or buttercream frosting.
- Next, divide the frosting equally into separate bowls. Stir a few drops of food coloring into each batch.
- Lay a piece of plastic wrap on your work surface and spread each frosting color in a long line on the plastic wrap, lining them up next to each other.
- Gently roll the plastic wrap long ways, twist both ends, cut off one end, and place the roll of frosting into a piping bag. You are good to go!
- The colors will mix beautifully as you are piping!

Note: Gel food coloring will provide a bolder more vibrant color.
Colorful Topping Ideas
Instead of sprinkles or jimmies, here are a some fun and colorful candy toppings:
If you're serving these little rainbow treats for a St. Patrick's Day party, try piping bright white frosting on top to emulate a light and fluffy cloud! Top with gold sprinkles!

Storage
Storing: You can store them frosted for up to 4 days in an airtight container at room temp.
Freezing: You can freeze rainbow cupcakes unfrosted. Put them in a freezer-safe container or Ziploc freezer bag and they should keep well for up to three months.
Before decorating, thaw at room temperature for 3 hours.
Other St. Patrick's Day Desserts
- Andes Chocolate Cookies - A delicious minty flavor, even though they aren't green!
- Shamrock Cookies
- Spritz Cookies - Color the dough shamrock green!

Tie Dye Rainbow Cupcakes
Ingredients
- ¾ cup granulated white sugar
- ¾ cup unsalted butter softened
- 2 large eggs
- 2 teaspoons vanilla extract
- 2 cups all-purpose flour spooned and leveled
- ½ teaspoon baking powder
- ½ teaspoon sea salt
- ⅔ cup whole milk
- food coloring
Instructions
- Preheat the oven to 350℉ and line a 12-cup muffin tin with paper liners.
- Add sugar and butter to a large mixing bowl. Use an electric hand mixer or stand mixer on high speed to cream the ingredients until smooth and no chunks of butter remain.
- Mix in the eggs and vanilla on medium speed until batter is smooth.
- Slowly add the flour, baking powder and salt. Be careful not to overmix the batter on this step.
- Once the flour mixture is completely incorporated, add the milk and slowly stir until the batter reaches a smooth consistency.
- Separate your cupcake batter into separate bowls for each color you would like to use.
- Add 6 drops of food coloring into each bowl and gently fold the batter until the food coloring is fully incorporated.
- Pour the batter into your cupcake liners in whatever order you would like and cook for 20 minutes at 350 degrees.
- Allow cupcakes to cool before frosting and enjoy!
Helpful Notes and Tips From Liz
- Use paper liners to prevent the cupcakes from sticking to the pan.
- Avoid over mixing the batter.
- How much of each colored batter to add isn't important. Just have fun!


Leave a Reply