Preheat the oven to 350°F (175°C). Line the cupcake pan with cupcake liners.
In a large mixing bowl, sift together the flour, sugar, baking soda, baking powder, salt, and cocoa powder.
In another bowl, combine the vegetable oil, buttermilk, eggs, vanilla extract, and purple food coloring or sweet potato puree. Mix well until combined.
Gradually add the wet ingredients to the dry ingredients, mixing until just combined. Do not overmix.
Evenly fill the cupcake liners with the batter, about ⅔ full.
Bake in the preheated oven for 20 minutes or until a toothpick inserted into the center comes out clean. Allow cooling in the pan for 5 minutes before transferring to a cooling rack.
While the cupcakes cool, prepare the cream cheese frosting. In a mixing bowl, beat together softened cream cheese and unsalted butter until smooth and creamy.
Gradually add powdered sugar, beating until well combined. Add vanilla extract and mix. If the frosting is too thick, add milk one tablespoon at a time until you reach your desired consistency.
Once the cupcakes are completely cool, frost them with the cream cheese frosting using a spatula or piping bag.