Preheat the oven to 350°F (175°C). Grease and line the bottom of the cake pans with parchment paper.
In a mixing bowl, whisk together the flour, baking powder, and salt. Set aside.
In another large bowl, using a stand mixer or hand mixer, cream the softened butter and granulated sugar together until light and fluffy (about 3-5 minutes).
Add the eggs one at a time, mixing well after each addition. Then, stir in the vanilla extract.
Gradually add the dry ingredients to the wet ingredients, alternating with buttermilk. Start and finish with the flour mixture. Mix until just combined.
Divide the batter evenly between the two prepared cake pans.
Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted in the center comes out clean. Allow the cakes to cool in the pans for 10 minutes, then transfer to a cooling rack to cool completely.
While the cakes cool, prepare the hidden colored cake. Using a boxed cake mix or your favorite recipe, bake a small round cake (about 6 inches) and color this cake with blue or pink food coloring. Let it cool and then cut into small wedges to insert into the larger cake.
Once the cakes have cooled, level the tops of the two layers if necessary. Place one layer on a cake stand, and insert the colored cake center in the middle (if using skewers for stability, insert them first).
Place the second cake layer on top, and frost the entire cake with the pastel-colored frosting. Decorate as desired with edible decorations.
Slice the cake to reveal the hidden gender color inside when ready to serve!