Heat the oven to 180C (350F) and line two muffin tins with 24 cupcake cases.
Whisk the flour, baking powder and salt together in a bowl and set aside.
Beat the butter and sugar for 3 minutes until pale and fluffy, then add the eggs one at a time, beating well between each.
Stir in the vanilla, then add the flour mixture and buttermilk alternately in three additions, starting and ending with flour, mixing just until smooth; overmixing here is what makes a tough cupcake.
Divide the batter between the cases, filling each two-thirds full, and bake for 16 to 18 minutes until a toothpick comes out clean and the tops spring back when touched.
Cool in the tin for 5 minutes, then move to a rack and cool completely, at least 30 minutes, before you cut into them.
Use a small paring knife or apple corer to cut a plug from the centre of each cupcake, about 2 cm wide and 2 cm deep, and set the plugs aside.
Spoon the pink filling into the hollows of 12 cupcakes and the blue filling into the other 12, filling right to the top of the hole.
Trim the bottom off each plug so it sits flush, and press it back on top of its cupcake to seal the colour inside; nobody should see a hint of it from outside.
Pipe the vanilla buttercream over the top of every cupcake so they all look identical from the outside, that sameness is the whole point of the trick.
Finish with a scatter of pink sprinkles on the pink-filled batch and blue on the blue-filled batch, just enough that whoever serves them can tell which is which without giving it away to guests.