In a large bowl, cream butter and sugar until light and fluffy.
Add egg, vanilla extract, and peppermint extract and mix well.
In a separate bowl, combine flour, baking powder, and salt.
Gradually add dry ingredients to the wet mixture and mix into a dough.
Divide dough into two equal portions.
Add red food coloring to one portion and mix until evenly colored.
Cover and chill both dough portions for 30 minutes.
Roll small portions of red and plain dough into ropes.
Twist the ropes together and shape into candy cane forms.
Place cookies on a lined baking tray.
Bake at 180°C (350°F) for 8–10 minutes until lightly golden.
Cool completely and dust with powdered sugar if desired.