In a large bowl whisk together the flour, baking powder, and salt.
In a separate large bowl, beat the butter until soft. Beat in the sugars.
Beat in the egg yolks and peppermint extract.
With the mixer starting on low speed, beat in the flour mixture.
Divide the dough into 2 equal pieces. Wrap the first piece in plastic wrap.
With the remaining half of the dough, beat in the red food coloring - starting with just a few drops until the desired color is reached.
Wrap the red dough in plastic wrap. Place both in the fridge for at least 4 hours to chill.
Preheat the oven to 350F degrees and line cookie sheets with parchment paper.
Take the dough out of the fridge. If it's rock hard, let it sit at room temperature for about 10 minutes so it's malleable.
With lightly floured hands, break off sections of white dough about 2 teaspoons in size. Pinch and roll each section until it's shaped like a log about 4-5 inches long.
Do the same with the red dough.
Using one log of the red dough and one of the white dough, wrap the logs around each other and form into a candy cane shape. Place the candy canes 2 inches apart on the lined cookie sheet.
For the optional egg wash - whisk together the egg white and teaspoon of milk, then brush the tops of each cookie and sprinkle the top with sugar or crushed candy canes.
Bake in the preheated oven for 8-10 minutes, or until the tops look set. Cool fully on the tray.
Notes
Peppermint extract can be substituted with 1 teaspoon vanilla extract and 1/2 teaspoon almond extract. Store cookies in an airtight container at room temperature for up to 4 days. Cookies can be frozen for up to 2 months, then thaw in the fridge.