In a small, microwave-safe bowl, whisk milk and egg yolk together and microwave 30 seconds. Set aside.
In a large bowl or bowl of a stand mixer, whisk together flour, sugar, and yeast.
Add milk mixture, butter, and salt and stir to combine.
Knead dough until it comes together and is smooth and elastic, about 5 minutes. This is a thick bread dough.
Divide dough into 5 equal pieces (or however many colors you choose); place each piece in a small bowl and cover with a tea towel.
Remove one piece from a bowl and place it on a plastic cutting board (or any surface you're willing to cover with food coloring). Add several drops of food coloring (I started with 10 drops and kept adding as you go). Using gloves to prevent your hands from getting dyed, begin to knead the food coloring into the dough, adding more food coloring until it is fully incorporated. This takes some time; just be patient, and it will come together!
Shape dough into a ball and return to its bowl. Repeat with remaining pieces of dough, dying each a different color, being sure to wash your hands/gloves and your work surface between each color.
Cover bowls with plastic wrap and let rise until doubled, about 1 ½ to 2 hours.
Once the dough has risen, punch down dough. Remove red dough and roll out on a lightly floured surface into an 8-by-4-inch rectangle. Roll out the yellow piece of dough into an 8-by-4-inch rectangle and place directly on top of red dough. Repeat with green, then blue, then purple mixtures until you have a stack of 8-by-4-inch rectangles.
Begin rolling up the dough from short end to short end.
Place loaf in a lightly greased 9-by-5-inch loaf pan. Cover with a tea towel or plastic wrap and let rise until doubled, about 1 hour.
Heat oven to 375°F. Uncover dough and bake until browned on top and cooked through about 30 minutes.
Remove loaf from pan and cool completely on a cooling rack before slicing.
After making one loaf, I plan on doing it a little differently next time. I will make 5 loaves. Adding the food coloring to the dough when I add the milk. Each batch of dough will be a different color, and then I will divide to make the rainbow loaves. This will save the kneading of the food coloring into the dough. I can freeze the loaves until we are ready to enjoy.