In a medium to large mixing bowl, cream together the softened butter and sugar.
Stir in the peppermint extract, vanilla extract, and egg until just combined.
In a smaller bowl, whisk together the flour, baking powder and salt.
Stir the dry ingredients into the wet ingredients until a soft dough forms.
Divide the dough in half or thirds. Mix in the food coloring. The best way to do this is with a stand mixer and paddle attachment. But you can do it by hand/with a spoon—just be careful not to stain your hands as you work.
Chill the dough in the refrigerator for a couple hours or overnight.
Roll the dough into long strands, like clay snakes. Twist together and shape into candy canes.
Place a baking sheet with parchment paper or a baking mat.
Bake at 350°F for 10-12 minutes.
Allow to cool on the baking sheet before moving to a cooling rack or serving tray.