Preheat the oven to 350°F.
Grease and line two 9 inch round cake pans with parchment paper, and then grease the parchment paper and dust with cocoa powder.
Sift the dry ingredients for the cake layers (flour, cocoa, baking powder, baking soda, and salt) into a medium bowl.
In the bowl of stand mixer (or in a large mixing bowl if using a hand mixer), beat the butter for 3 to 5 minutes until soft and light, scraping the bowl intermittently.
Add the sugar, and beat the butter and sugar together until light and fluffy, another 1 to 2 minutes.
Add the eggs, one at a time, and beat for one minute after each one.
Scrape the bowl, add the vanilla, and beat for an additional minute.
Measure out the buttermilk into a 2 cup measuring cup, and then add the vinegar and food coloring (see notes) to the measuring cup.
Add the dry ingredients in three parts and alternate with the buttermilk mixture (in two parts), starting and ending with the dry ingredients. Mix only as long as needed to incorporate the addition, and scrape down the bowl as needed.
Pour the batter into the prepared pans, even the batter out in the pan, and give it one or two gentle thwacks (i.e. careful drops) onto the kitchen counter to remove any air bubbles.