Preheat oven to 350°F (175°C) and line a cupcake pan with liners.
In a bowl, whisk flour, cocoa powder, baking soda, and salt.
In another bowl, mix oil and sugar until combined. Add egg and mix well.
Stir in buttermilk, vanilla, vinegar, and food coloring.
Gradually add dry ingredients and mix just until combined.
Divide batter evenly into liners.
Bake for 18–20 minutes, or until a toothpick comes out clean.
Cool completely before frosting.
Beat cream cheese and butter until smooth. Add powdered sugar and vanilla, then beat until fluffy.
Frost cupcakes as desired.