Preheat oven to 375° F. Place oven rack in the middle. Line 2 baking sheets with parchment paper.
Whisk flour and baking soda together in a medium bowl, set aside.
Melt 10 Tablespoons of butter in a skillet over medium high heat. Continue cooking, swirling pan constantly until butter is dark golden brown with a nutty aroma, 1 to 3 minutes.
Transfer melted butter to a large heatproof bowl. Whisk in remaining 4 tablespoons of butter until completely melted.
Add both sugars, salt, and vanilla to bowl with butter and whisk until fully incorporated. Add egg and egg yolk and whisk until mixture is smooth, about 30 seconds.
Let mixture stand 3 minutes then whisk for 30 seconds. Repeat process of resting and whisking 2 more times. Mixture will be thick, smooth and shiny.
Stir in flour mixture until just combined.
Divide the dough into the number of colors you are using. I used six colors. Make a well in each one, drop in some dye and knead until the color has permeated the entire dough. Divide the chocolate chips and nuts, if using, equally between the doughs and mix in. Placing the dough in a bowl may help keep the chips contained when mixing in.
Here are our two ways of assembling the rainbow cookie:
Take a little piece of each color, approximate 1 ½ teaspoons and layer them next to each other and roll into a ball. We’re always in a hurry, so we take chunks of about 1 Tablespoon of each color which make a substantial ball and then cut divide in half and roll into balls.
Take half of each colored dough and roll out flat, about 1/8 -inch thick. Stack the layers on top of each other. The edges won’t align perfectly and that’s ok. Cut into a grid of 1 ½ -inch squares. Take each square in your hand and roll into a ball. Combine the imperfect edges to make balls of a similar size.
Repeat with the other half of the dough. Stack differently for a varied look.
Place cookie balls 2 inches apart on prepared baking sheets. You’ll have 8 balls per sheet. Bake cookies 1 tray at a time for 10 to 14 minutes, rotating sheet halfway through baking. Cookies are done when the edges have begun to set and brown, but the centers are soft. Transfer cookies to wire rack to cool.
Makes 16 Large cookies.