Rainbow cookies are quite possibly our favorite cookies. Ever. Whenever someone brings a cookie assortment from an Italian bakery we always eat all the rainbow cookies first and usually discard the rest.

The best rainbow cookies money can buy are available at Isaac's Bake Shop, 1419 Avenue J in Brooklyn, NY, right across the street from Di Fara's pizza, and just a few blocks away from where we grew up. (We still think it's pretty funny that people come from Manhattan to our old local pizza joint out in Brooklyn.)

The second best rainbow cookies money can buy can be found at Ferrara Bakery at 195 Grand Street in Little Italy in Manhattan, and in their outpost around the corner on Mulberry Street just off of Canal Street. (Calling it Little Italy feels absurd at this point, though. We think we'll all agree that Little Italy has mostly been swallowed up by Chinatown over the years. It fell victim to the most famous of the classic blunders: Never get involved in a land war in Asia.)

But the best rainbow cookies that money can't buy can be found right here in our kitchen tonight.

What makes them better than store bought rainbow cookies? Why are they worth the bother to make? Well, the layers are more intensely almondy and moister than the storebought kind. The jam is fresher, and if you're really feeling into it, you can use any sort of interesting or even homemade jam instead of the regular kind. You can choose your favorite kind of chocolate, and you can put on just as much or as little as you like.

Sure, they take a few days to make, but you're not actually working during all that time. The layers aren't very fussy to bake or put together, and it's really just a matter of waiting until the next night to glaze and chocolatize them.

And here's another perk: you can store these cookies in an airtight container at room temperature for several weeks, or probably freeze them indefinitely. Read on for the recipe.

Rainbow Cookies
(adapted from Great Cookies by Carole Walter)
12 ounces almond paste (careful, this is not the same thing as marzipan)
1 C (2 sticks) unsalted butter
1 C granulated sugar
4 large eggs, separated
1 tsp vanilla extract
2 C all-purpose flour
1/2 tsp salt
Green and red food coloring
1/4 C seedless raspberry preserves
1/2 C apricot preserves
15 oz. semisweet chocolate, coarsely chopped

Build the cake layers.

Position the shelves in the upper and lower thirds of the oven. Preheat the oven to 350 F. Lightly butter the bottom of the three 12 1/4" x 8 1/4" baking pans. (This step will help glue the parchment paper to the baking pans, making it easier to prepare them further.)

Line the bottoms with parchment paper, then butter the parchment paper and the sides of each pan. Sprinkle some flour over them, and shake most of it out.

Finely chop the almond paste in your food processor, or grate it with a box grater or microplane.

In the bowl of a KitchenAid (or other electric mixer, we suppose), using the paddle attachment, mix the butter on medium-low speed just until smooth, not fluffy. Increase the speed to medium, add the almond paste, and beat until lightened in color, about 2 minutes. Pour in the sugar in a steady stream, beating for about 1 more minute. Then add the 4 egg yolks and the vanilla, beating well to combine.

In a separate bowl, whisk together the salt and flour. Add a third of it into the mixer and blend just until incorporated. Add half of what remains, and do the same. Add the rest, and again mix just until incorporated.

Set the dough aside.

In a clean mixer bowl, using the whip attachment, beat the 4 egg whites until firm peaks form. This works best if you start at a low speed, wander away for a bit, raise the speed, wander away for a bit, &c, until it's going strong and the whites are really frothing up well.

Using a large rubber spatula, gently fold one-third of the egg whites into the batter to lighten the mixture, then fold in the remaining egg whites in two more additions. This will be a pain in the ass. The dough will be thick and dense and you will feel like you can't possibly fold in the whites, and you must be committing bubble genocide in the attempt. Persevere. It will all be okay in the end.

Divide the batter into thirds (each measuring approximately 1 2/3 C) and place each into a separate bowl. Color one portion with the green food coloring, blending until evenly colored. Color the second portion with the red food coloring, again blending until evenly colored. The remaining portion is not colored.

Spread the batters in the pans, each color in its own separate pan, smoothing the tops with a small offset spatula. Evenly distribute the batter as best you can. It will seem terrifyingly thin, difficult to spread evenly covering the whole pan. Again, just do your best, and it will all work out.

7. Bake for 10-15 minutes, or until the tops are firm to the touch and very slightly brown. Cool the pans on wire racks, then flip each pan to remove the cake layer and peel off the parchment.

Assemble the layers.

Set up a cookie sheet or cutting board covered in plastic wrap. Place the green layer on it. Using a small offset spatula, spread the surface evenly with 2 tablespoons of the raspberry preserves. Place the plain layer on top of the raspberry preserves. Align the two layers and press them together. Spread 2 tablespoons of the raspberry preserves over the plain layer, again using a small offset spatula. Then place the red layer on top of the raspberry preserves. Be sure that the three layers are evenly aligned, then press them together again.

Wrap the layered stack tightly with plastic wrap, sealing the ends securely, and place it on a clean cookie sheet. Place another cookie sheet on top of the wrapped stack and weigh it with two or three heavy cookbooks to compress the layers. Let the stack rest at room temperature for at least 24 hours, turning it over once or twice during the weighting period.

Glaze the layers.

Unwrap the stack and set it on a cutting board. Using a large serrated knife, trim 1/4" from all sides. Then cut the stack into five equal strips Separate the strips and place them on a large wire rack set over a cookie sheet.

Place the apricot preserves and 2 tbsp water in a small saucepan. Bring to a boil, then simmer for 1 minute. Strain and discard the pulp. Brush a thin layer of the glaze on the top and sides of each strip, to seal the surface. Let stand for 1/2 hour or longer, to dry and set.

Cover the layers with chocolate.

Temper your chocolate. If you already know how, and have a preferred method, don't even bother reading further. Just temper it, glaze the strips with it, cut them into cookies once it sets, and move on with your life. If you don't yet know how to temper chocolate, though, read on.

Finely chop your chocolate. Set up a double boiler (we use a bowl set in a pot of water) and bring the water up to a simmer. Put 2/3 of the chocolate in the bowl, setting the rest aside for now. Slow melt it, stirring, until it hits about 113 F. Don't let it get much hotter than that, or things may not work out.

Remove the bowl from the heat and stir in the other 1/3 of the chocolate, letting it melt. Once it has melted in, pour the chocolate onto a dry, flat, cool surface. You're going to fold it with an offset spatula as it cools, letting it thicken, until it hits about 82 F.

Once that happens, transfer it to a clean bowl and put it back on the simmering water. Heat it, stirring, until it hits about 88 F. Remove from the heat.

You can test whether the chocolate is properly tempered by putting a spoon in the freezer for a bit, until it gets cool. Dip the spoon into the chocolate. If it sets on the back of the spoon fairly quickly, getting hard and glossy in just a few minutes, your chocolate is properly tempered. Congratulations!

Now, put that lovely tempered chocolate to good use. Working one strip at a time, spoon about 1/5 of the melted chocolate down the length of the strip. Using a small offset spatula, spread the chocolate evenly over the top and sides, taking care to smooth all surfaces. Repeat with the remaining strips. Let the strips stand at room temperature until the chocolate hardens. Then, cut each strip into 5/8" slices.