Grease and line two 9-inch round cake pans with parchment paper. Grease the parchment and dust with cocoa powder.
Sift together the flour, cocoa powder, baking powder, baking soda, and salt in a medium bowl.
In a stand mixer bowl, beat the softened butter for 3-5 minutes until light and creamy, scraping the bowl occasionally.
Add the granulated sugar and continue to beat until the mixture is fluffy, around 1-2 minutes.
Incorporate the eggs one at a time, beating well after each addition.
Scrape the bowl, add the vanilla extract, and mix for an additional minute.
Measure out the buttermilk in a 2-cup measuring cup, then add the vinegar and food coloring if using.
Add the dry ingredients in three parts, alternating with the buttermilk mixture in two parts, beginning and ending with the dry ingredients. Mix until just combined, scraping the bowl as needed.
Divide the batter evenly between the prepared pans, smoothing the tops. Tap the pans gently on the counter to release air bubbles.
Bake on the middle rack for about 25 minutes, or until a toothpick inserted into the center comes out clean. Check around 18-20 minutes to avoid overbaking.
Cool the cake layers in the pans for 10 minutes, then transfer to cooling racks to cool completely.
White chocolate cream cheese frosting:
Melt the white chocolate in a double boiler, taking care not to overheat. Let cool.
In a mixing bowl, cream together the softened cream cheese and butter until smooth.
Add the vanilla extract and cooled white chocolate, blending until combined.
Add food coloring, if desired, to achieve your preferred shade.