Go Back
+ servings
Chocolate Rainbow Cake for St. Patrick's Day

Chocolate Rainbow Cake Recipe

This moist, rich Chocolate Rainbow Cake is perfect for St. Patrick's Day! While the outside of the cake is festive, it's the inside of the cake that has a bright, rainbow filling.
Course Dessert
Cuisine American
Prep Time 1 hour 30 minutes
Cook Time 30 minutes
Total Time 2 hours
Servings 6 people
Calories 1101kcal


For the Cakes:

  • 1 ¼ cups all-purose flour
  • ½ cup cocoa powder
  • ¾ tsp baking soda
  • ¼ tsp salt
  • 1 cup granulated sugar
  • cup vegetable oil I used coconut oil, melted and cooled
  • 1 large egg
  • ¾ cup milk whole or 2%
  • 1 tbs vinegar

For the Frosting:

  • 2 cups unsalted butter softened
  • 5 cups confectioners' sugar
  • 2 tsp vanilla extract
  • 1 to 1 ½ tsp whole milk

For Decorating:

  • Food coloring - I used AmeriColor Food Gels in the following colors:
  • Tulip Red
  • Orange
  • Lemon Yellow
  • Leaf Green with a drop of Electric Green
  • Royal Blue
  • Violet with a drop of Electric Purple


For the Cake:

  • Preheat the oven to 350 degrees F.
  • With parchment paper, line 3 6-inch round pans. Grease the pans. Set them aside.
  • In a medium bowl, sift together flour, cocoa powder, baking soda, and salt.
  • In a large bowl, whisk the sugar and oil together.
  • Add the egg and vanilla and whisk until just combined.
  • In a measuring cup, add the milk and vinegar.
  • In three additions, alternately add the dry ingredients and the milk to the sugar mixture. Start and end with the dry ingredients.
  • Mix until just combined.
  • Divide the batter evenly between each of the pans.
  • Bake for about 30 min or until a toothpick inserted in the center of the cake comes out clean.
  • Allow the cakes to cool in the pans for about 15 min. Then invert on to cooling racks. Allow the cakes to cool completely.

For the frosting:

  • In the bowl of a mixer fitted with a paddle attachment, mix the butter and sugar until fluffy.
  • Add the vanilla and cream. Beat until fluffy.
  • Measure out a scant ¼ of a cup of frosting in 6 separate bowls. Tint each bowl with one color of the rainbow.
  • Place the frosting in pastry bags fitted with large tips. (I used #10 tips)
  • Level the cakes.
  • Then fill them as shown in the photo in the post.
  • Once the cakes are filled, place the cake in the refrigerator to chill for about 20 minutes.
  • Use the remaining frosting to crumb coat and frost the cake.
  • The leftover colored frosting can be used to decorate the cake.


Calories: 1101kcal | Carbohydrates: 139g | Protein: 3g | Fat: 63g | Saturated Fat: 40g | Polyunsaturated Fat: 2g | Monounsaturated Fat: 16g | Trans Fat: 2g | Cholesterol: 166mg | Sodium: 260mg | Potassium: 174mg | Fiber: 2g | Sugar: 133g | Vitamin A: 1942IU | Calcium: 65mg | Iron: 1mg