Preheat your oven to 350°F (175°C). Line a 9×13-inch baking pan with parchment paper, leaving some overhang on the long sides to lift the bars out later. Lightly spray the parchment and sides of the pan with nonstick spray.
In a large mixing bowl or stand mixer fitted with the paddle attachment, beat 1 cup softened unsalted butter and 1 1/2 cups granulated sugar on medium speed for 2–3 minutes, until light and fluffy. Scrape down the sides of the bowl once or twice.
1 cup unsalted butter, 1 1/2 cups granulated sugar
Add the eggs one at a time, mixing well after each addition. Mix in 2 teaspoons vanilla extract and 1/2 teaspoon almond extract (if using) just until combined.
2 large eggs, 2 teaspoons pure vanilla extract, 1/2 teaspoon almond extract
In a separate bowl, whisk together 2 1/2 cups all-purpose flour, 1 teaspoon baking powder, and 1/2 teaspoon fine sea salt.
2 1/2 cups all-purpose flour, 1 teaspoon baking powder, 1/2 teaspoon fine sea salt
With the mixer on low, gradually add the dry ingredients to the wet mixture, mixing just until no streaks of flour remain. Do not overmix.
Transfer the dough to the prepared 9×13 pan. Use a spatula or clean hands to press the dough evenly into the pan, pushing it into the corners and smoothing the top.
Bake on the center rack for 16–20 minutes, until the edges are just lightly golden and the center looks set. A toothpick inserted in the center should come out mostly clean with a few moist crumbs but no wet batter.
Place the pan on a wire rack and let the bars cool completely in the pan, about 1 hour, before frosting.
In a clean mixing bowl, beat 1 cup softened unsalted butter on medium speed for 1–2 minutes until smooth and creamy. Add 3 1/2 cups of powdered sugar, one cup at a time, mixing on low then increasing to medium until combined. Beat in 2 tablespoons cream or milk, 1/2 teaspoon peppermint extract, 1 teaspoon vanilla extract, and a pinch of fine sea salt. Add 2–3 drops food coloring if using and mix until evenly colored. Adjust consistency with more sugar or cream as needed.
1 cup unsalted butter, 3 1/2–4 cups powdered sugar, 2–3 tablespoons heavy cream or whole milk, 1/2 teaspoon peppermint extract, 1 teaspoon pure vanilla extract, fine sea salt, 2–3 drops red or pink gel food coloring
Once the bars are completely cool, use the parchment overhang to lift the slab out of the pan onto a cutting board, or frost them directly in the pan. Spread the peppermint frosting evenly over the top with an offset spatula or butter knife.
Immediately sprinkle 1/2–3/4 cup crushed candy canes or peppermint candies over the frosting, gently pressing them in so they stick.
1/2–3/4 cup crushed candy canes or peppermint candies
For the neatest cuts, chill the frosted bars for 20–30 minutes, then use a long, sharp knife to cut into 20–24 squares or rectangles, wiping the knife clean between cuts.