In a medium bowl, sift together the flour, baking powder and salt.
In the bowl of a stand mixer fitted with the paddle attachment, beat the butter until smooth, about 2 minutes. Add the sugar and continue beating until the mixture is light and fluffy, about 3 minutes. Add the eggs one at a time, beating between each addition, then add the vanilla.
Turn the mixer off. Add the flour and then beat just until combined.
Remove the dough and divide it in half. Shape one piece of the dough into a square, wrap it securely in plastic wrap and place it in the fridge. (This will be the white portion of the candy cane cookies.)
Return the remaining dough to the stand mixer bowl, and with the mixer on "low," add in the red food coloring until it reaches your desired color. Remove the dough, shape it into a square, wrap it securely in plastic wrap and place it in the fridge. (This will be the red portion of the cookies).
Refrigerate both pieces of the dough for 30 minutes.
Line two baking sheets with parchment paper. Lightly flour your work surface.
Divide each piece of dough into 18 pieces. Roll each piece into a ball, then roll each ball into an 8-inch rope. Twist one white and one red rope together. Transfer the cookie onto the baking sheet then bend the top slightly to form the candy cane shape. If desired, trim the edges of the candy canes. Repeat with the remaining balls of dough, re-flouring your work surface as needed. (See Kelly’s Note.)
Place the baking sheets in the freezer for 20 minutes or in the fridge for 30 minutes.
Preheat the oven to 350ºF.
Bake the cookies for 10 to 12 minutes until pale golden, and then transfer them to a wrack to cool completely.