Preheat the oven to 400°F. Set out clean, cool, ungreased baking sheets and fit a cookie press with a tree disk.
Beat the softened butter and sugar until creamy and lighter in color. Mix in the egg yolks and almond or vanilla extract. Stir in grated almonds if using.
Gradually mix in the flour just until a soft dough forms. Add green food coloring if desired.
Fill the press. Hold it upright with the disk flat against the baking sheet, press one tree, and lift straight up.
Sprinkle with red sanding sugar if desired. Bake 7 to 10 minutes, until set and just beginning to turn golden at the edges.
Cool on the pan for several minutes, then move to a rack. Cool the baking sheets completely between batches.