Preheat the oven to 350°F (175°C) and grease two 8-inch cake pans.
In a mixing bowl, whisk together the flour, cocoa powder, baking soda, and salt. Set aside.
In another bowl, beat the butter and sugar with an electric mixer until light and fluffy.
Add the eggs one at a time, mixing well after each addition.
Stir in the buttermilk, vinegar, vanilla extract, and blue food coloring until well combined.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Divide the batter evenly between the prepared cake pans and smooth the tops.
Bake for 28-30 minutes, or until a toothpick inserted into the center comes out clean.
Let the cakes cool in the pans for 10 minutes, then transfer to a cooling rack to cool completely.
For the frosting, beat the cream cheese and butter until smooth. Gradually add the powdered sugar and vanilla extract, mixing until creamy.
Spread the frosting evenly between the cake layers and over the top and sides of the cake.
Chill for 30 minutes before slicing and serving.