Ingredients
1/4 cup (57 grams) unsalted butter, cold, cubed, plus more for the pan
3 cups (384 grams) all-purpose flour, plus more for the pan
2 cups (400 grams) granulated sugar
1 tablespoon baking powder
1 1/2 teaspoons kosher salt
1/4 teaspoon ground turmeric
3/4 cup (145 grams) canola oil
4 1/2 teaspoons vanilla extract
2 large eggs
2 large egg yolks
2 cups (467 grams) buttermilk, room temperature
3/4 cup (170 grams) unsalted butter, melted and cooled slightly
1 cup (85 grams) natural cocoa powder
1 1/2 teaspoons vanilla extract
3/4 teaspoon kosher salt
4 1/2 cups (513 grams) powdered sugar
1/2 cup strong, cold coffee, plus more as needed
Instructions

    For the yellow cake

  1. Make the cake layers. Preheat the oven to 350° F. Butter two 9-inch cake pans. Line the bottoms with circles of parchment. Butter the parchment. Add a spoonful of flour to each pan and tap around to distribute; toss any extra.
  2. Combine the flour, sugar, baking powder, salt, and turmeric in the bowl of a standing mixer fitted with the paddle attachment. Add the butter and set to medium-low. Let that go until the butter is completely incorporated and the mixture is pale yellow. Meanwhile, combine the rest of the ingredients in another bowl and whisk with a fork until smooth.
  3. With the mixer on low, slowly pour in the wet ingredients. Stop partway through to scrape down the bowl and paddle attachment, to make sure the dry ingredients aren’t clumping. Mix until the batter is completely cohesive and smooth.
  4. Evenly divide the batter between the prepared cake pans (a scale really helps here). Bake for 37 to 40 minutes, until the edges are golden brown and a thin knife inserted in the center comes out completely clean.
  5. Cool in the pans until they’re cool enough to touch, then transfer to a cooling rack to cool completely. I like to do this with the parchment on the bottom as sticky insurance. Just remember to remove before building the cake.

    For the chocolate frosting

  1. Make the chocolate frosting. Combine the butter and cocoa in the bowl of a standing mixer fitted with the whisk attachment. Mix until smooth, scraping down as needed. Add the vanilla and salt. Mix again. Alternately add the powdered sugar and coffee, beating until light and fluffy. (If it doesn’t start to fluff up, it may be too warm. Chill for a little while until thicker, then beat again.)
  2. Psst: A couple tricks to make cake-frosting easier: Chill the layers, either in the fridge or freezer, for 15 to 30 minutes beforehand. Make sure the frosting is spreadable, but fairly firm.
  3. Set the first layer on your serving platter or a rotating turntable if you have one. Add about 1 cup frosting on top and spread evenly (I like an offset spatula best here). Top with the second cake layer. Add another 1 1/2 cups frosting to the top and spread evenly over the top, then the sides. Add more frosting as needed. Use the offset spatula or a spoon to create swooshes. Slice and eat or refrigerate until you’re ready to eat.