1 3/4 cups all-purpose
1 cup dark cocoa powder, sifted
2 teaspoons baking soda
1 teaspoon baking powder
1 cup firmly packed brown sugar
1/2 cup white
1/2 cup unsalted butter, softened
2 large eggs, at room temperature
2 teaspoons vanilla extract
1 cup strongly brewed coffee, cooled to room temperature
1 cup sour cream
1 cup unsalted butter, softened
4 cups sifted powdered sugar
1 1/2 teaspoons vanilla extract
1/4 teaspoon salt
1 tablespoon heavy cream, or more as needed
1 drop blue food coloring, or as needed
1 drop purple food coloring, or as needed
1 tablespoon pink sprinkles, or as needed
1 (.75 ounce) tube black decorating gel
4 marshmallows, quartered
1 tablespoon pink sanding sugar, or as needed
Preheat the oven to 350 degrees F (175 degrees C). Lightly grease two 9-inch cake pans and line with parchment paper.
Whisk flour, cocoa powder, baking soda, baking powder, and salt together in a medium bowl.
Combine sugars and butter in a large bowl; beat with an electric mixer until light and fluffy. Beat in eggs one at a time, thoroughly mixing after each addition. Beat in vanilla extract.
Mix 1/3 of the flour mixture into the butter mixture until just combined. Mix in 1/2 of the coffee and 1/2 of the sour cream until just combined. Add remaining flour mixture alternately with remaining sour cream and coffee. Do not overmix. Divide batter between the cake pans.
Bake in the preheated oven until a toothpick inserted into the center comes out with just a few moist crumbs attached, 25 to 30 minutes. Cool in the pans for 15 minutes. Run a knife around the edge of the pans before inverting cakes onto cooling racks. Peel off parchment paper. Cool cakes completely, about 30 minutes.
Make frosting while cakes cool. Beat butter with an electric mixer until light and fluffy. Beat in powdered sugar, 1 cup at a time, until incorporated. Mix in vanilla extract and salt. Add heavy cream. Beat frosting on medium speed until light and fluffy, about 3 minutes.
Add more heavy cream if needed to reach a spreadable consistency.
Place 1/2 cup frosting into 2 separate bowls. Stir blue food coloring into one bowl and purple food coloring into the other. Place colored frostings into a piping bag fitted with a star tip.
Place 1 cooled cake layer onto a cake plate. Top with 3/4 cup of white frosting. Place second cake layer on top. Frost the outside and top of the cake with remaining frosting.
Divide the cake into 8 wedges by tracing a sharp knife through the frosting on the top; do not cut all the way through. Place 2 pink sprinkles in the innermost point to make unicorn’s nostrils. Pipe the eyes and eyelashes near the upper portion of each wedge using the black decorating gel. Pipe blue and purple unicorn hair at the top of each wedge.
Stretch marshmallow quarters into ear shapes and dip into pink sugar. Attach 2 ears to the edge of each slice. Pipe more hair around the ears. Keep cake refrigerated until ready to serve.