Rainbow cakes seem to be everywhere in my life these days. I made one last summer, and my family and guests loved the bright, vibrant colors. But in the back of my mind, I couldn’t ignore the ongoing conversation about artificial food coloring and its potential downsides. That’s when my husband challenged me to take on a new baking experiment: creating a rainbow cake using only natural food dyes.
My first experience with natural food dyes happened by accident when I was a child. While making blueberry muffins, I realized that the more I stirred the batter, the more the berry juice bled, turning the muffins a deep shade of blue. Fast forward to a couple of years ago, and I took on my first intentional experiment—dyeing Easter eggs with natural ingredients. I was fascinated by the beautiful colors that everyday fruits, vegetables, and spices could create. Since then, I’ve dabbled in all kinds of colorful cooking experiments, from using spinach to make Green Eggs and Ham to naturally tinting buttercream frosting.
I have to admit, coloring sweets with natural dyes can be tricky. Many ingredients that create stunning hues also come with strong flavors that don’t always play well with desserts. I know what you’re thinking—using spinach to dye eggs makes sense, but spinach juice in a cake?!
Well, I can now confidently say: yes, it works! You end up using such a small amount of vegetable juice that the flavor is barely noticeable—especially once the cake is frosted. Even my toughest critic, my son, took a bite and exclaimed, “It’s beautiful, Mommy!” The rest of my family agreed that it tasted just like regular cake, and honestly, it felt more natural and enjoyable than the typical neon-colored rainbow cakes made with synthetic dyes. I considered that a baking success. Given the choice, I’d much rather serve my loved ones a cake colored with beets or carrots than one loaded with artificial ingredients.
Just like dyeing Easter eggs or other natural dye projects, making a rainbow cake with natural colors can be a fun and educational experience for kids. They can brainstorm different colorful foods and experiment with creating their own edible rainbow. Not only is it a great learning opportunity, but it also helps kids appreciate the natural beauty of food. Plus, the process can be applied to other creative projects, like homemade finger paints or playdough.
For this cake, I used a basic white cake recipe I’ve relied on for years and paired it with vanilla buttercream. I then coated the exterior with a layer of whipped cream frosting. Combining the rich, buttery buttercream with light, airy whipped cream is one of my new favorite techniques—it creates the perfect balance of sweetness and texture.
To test my natural dye options, I first made a batch of cupcakes, experimenting with different ingredients. From there, I narrowed it down to six finalists based on both color and flavor, resulting in a rainbow cake that was as beautiful as it was delicious.
Why You’ll Love This Recipe:
- All-Natural Colors: Ditch artificial food dyes and use fruit, vegetable, and plant-based ingredients to create a stunning rainbow effect.
- Fun & Educational: A great baking experiment for kids, teaching them how natural ingredients can be used to color food.
- Beautiful Yet Simple: The pastel hues make for an elegant, whimsical cake without overpowering flavors.
- Perfect for Special Occasions: A showstopping cake for birthdays, celebrations, and events.
Ingredients You’ll Need:
Natural Dyes:
- Red: beet juice
- Orange: carrot juice
- Yellow: egg yolk + milk
- Green: spinach juice
- Blue: blueberry juice
- Purple: blackberry juice
White Cake:
- Flour
- Baking Powder
- Sugar
- Butter & Oil
- Egg Whites
- Milk
- Plain, Fat-Free Yogurt
- Vanilla Extract
Buttercream Frosting:
- Powdered Sugar
- Butter
- Vanilla Extract
- Milk
Whipped Cream Frosting:
- Heavy Cream
- Powdered Sugar
- Salt
- Vanilla Extract
Equipment You’ll Need:
- 6 Cake Pans (5.5-inch) or Baking Sheets: For individual colored layers.
- Mixing Bowls: For preparing cake batter and natural dyes.
- Electric Mixer or Whisk: To cream butter, beat egg whites, and whip frosting.
- Juicer or Blender: To extract natural dyes from fruits and vegetables.
- Fine Mesh Strainer or Cheesecloth: For straining out juices.
- Cake Turntable & Offset Spatula: Helps with smooth frosting application.
Important Cooking Tips:
- Use Concentrated Juices: The more concentrated the natural dye, the richer the color. Simmer juices slightly to reduce moisture while intensifying pigment.
- Test Colors Before Baking: Natural colors can fade or change during baking—adjust by adding more dye if necessary.
- Layer Cakes Evenly: Weigh out batter portions to ensure equal-sized layers.
- Chill Before Frosting: A short chill helps set the cake, making it easier to frost.
Planning Ahead:
- Make Natural Dyes in Advance: Store extracted juices in airtight containers in the fridge for up to 2 days.
- Bake Layers Ahead of Time: Store cooled cake layers wrapped in plastic wrap for up to 24 hours before assembling.
- Frosting Prep: Buttercream can be made a day ahead and refrigerated; whip before using.
Storing, Freezing, Reheating:
- Refrigeration: Store in an airtight container for up to 3 days.
- Freezing Cake Layers: Wrap individual layers in plastic wrap and freeze for up to 2 months. Thaw before frosting.
- Freezing Assembled Cake: Store whole cake wrapped in plastic wrap for up to 1 month.
- Reheating: Bring to room temperature before serving.
FAQ:
Q: Will the cake taste like vegetables?
A: No! The amounts used are small enough that they won’t affect the cake’s flavor. The frosting also helps mask any subtle earthy notes.
Q: How can I make the colors more vibrant?
A: Use more concentrated juices by reducing them over low heat before adding to the batter.
Q: Can I use frozen fruit instead of fresh?
A: Yes! Thaw and strain berries to extract juice for coloring.
Q: Can I make this gluten-free?
A: Yes, substitute 1:1 gluten-free flour for the all-purpose flour.
Q: Why did my layers turn brown?
A: Natural colors can fade when exposed to too much heat—reduce oven temperature slightly and bake for a few minutes longer.
Substitutions and Allergies:
- Egg-Free: Replace egg whites with aquafaba (chickpea brine) or a commercial egg replacer.
- Dairy-Free: Use plant-based milk and butter substitutes for cake and frosting.
- Refined Sugar-Free: Swap granulated sugar for coconut sugar (though this may slightly alter the color).
Beverage Pairings:
- Berry-Infused Lemonade: Bright and fruity to complement the cake’s flavors.
- Vanilla Chai Latte: Spiced warmth works beautifully with the subtle sweetness of the cake.
- Sparkling Rosé: Make it celebratory!
Step-by-Step Guide for Making Rainbow Cake with Natural Dyes
1. Prepare the Natural Dyes
- Juice beets in a juicer or use the liquid from canned beets.
- Juice carrots in a juicer or use store-bought carrot juice.
- Juice spinach in a juicer.
- Microwave 1/4 cup (25 g) frozen blueberries in 30-second intervals until they burst, then strain out 1+ tablespoon (15+ mL) blueberry juice.
- Microwave 1/4 cup (25 g) frozen blackberries in 30-second intervals until they burst, then strain out 1+ tablespoon (15+ mL) blackberry juice.
2. Prepare the Cake Batter
- Preheat oven to 350°F (175°C).
- Cream the butter, oil, and sugar in a large mixing bowl until light and fluffy.
- Add the egg whites and beat well.
- Mix in vanilla, 1 cup (237 mL) milk, and yogurt.
- In a separate bowl, whisk together the flour, baking powder, and baking soda.
- Gradually add the dry ingredients to the wet ingredients, alternating with the remaining milk.
3. Color the Cake Batter
- Divide the cake batter into six equal portions (about 1/2 cup per bowl).
- Mix in the natural dye for each bowl:
- Red: 2 tablespoons (30 mL) beet juice
- Orange: 1 1/2 tablespoons (20 mL) carrot juice
- Yellow: 1 egg yolk + 1 tablespoon (15 mL) milk
- Green: 1 tablespoon (15 mL) spinach juice
- Blue: 1 tablespoon (15 mL) blueberry juice
- Purple: 1 tablespoon (15 mL) blackberry juice
- If needed, adjust the color intensity by adding more juice.
4. Bake the Cake Layers
- Grease and flour six 5.5-inch cake pans (or bake in batches).
- Pour each colored batter into a separate pan.
- Bake for 10-15 minutes, or until the cake springs back when touched and a toothpick inserted in the center comes out clean.
- Cool for 5 minutes in the pan, then invert onto wire racks to cool completely.
5. Make the Buttercream Frosting
- In a large bowl, beat butter, powdered sugar, vanilla, and milk until smooth.
- Adjust the consistency by adding more powdered sugar (for thickness) or milk (for softness).
6. Make the Whipped Cream Frosting
- Beat heavy cream, powdered sugar, and salt at medium speed until stiff peaks form.
- Fold in vanilla extract.
7. Assemble the Cake
- Place the purple layer on a serving platter.
- Spread 2 spoonfuls of buttercream frosting evenly on top.
- Repeat with the blue, green, yellow, orange, and red layers.
- Lightly freeze the cake for 5 minutes to set the frosting.
- Coat the entire cake with buttercream frosting using a knife or spatula.
- Apply whipped cream frosting for a smooth, soft finish.
- Serve immediately.
If You Liked This, You Are Going To Love These Cake Recipes:
Carrot Sheet Cake with Cream Cheese Frosting
Ciambellone: How to Make the Classic Italian Ring Cake
Blackberry and Honeycomb Brittle Cake

Rainbow Cake with Natural Dyes
- Total Time: 1 hour 45 minutes
- Yield: 8-10 Slices 1x
Description
This Rainbow Cake is made entirely with natural dyes, using ingredients like beet juice, spinach, and blueberry juice to create a colorful, pastel effect. It is as delicious as it is visually stunning.
Ingredients
Natural Dyes:
- 1–2 tablespoons (15–30 mL) beet juice
- 1 tablespoon (15 mL) carrot juice
- 1 egg yolk
- 1 tablespoon (15 mL) spinach juice
- 1+ tablespoon (15+ mL) blueberry juice
- 1+ tablespoon (15+ mL) blackberry juice
White Cake (Courtesy of Cooking Light):
- 3 1/2 cups (348 g) flour
- 2 teaspoons (7.5 g) baking powder
- 1/2 teaspoon (2 g) baking soda
- 1 3/4 cups (335 g) sugar
- 1/4 cup (57 g) butter
- 1 1/2 tablespoons (20 g) oil
- 2 egg whites
- 1 2/3 cups (394 mL) milk, divided
- 1/2 cup (60 g) plain, fat-free yogurt
- 2 1/2 teaspoons (12 mL) vanilla
Buttercream Frosting:
- 3 3/4 cups (488 g) powdered sugar
- 1/2 cup (115 g) butter, softened
- 1 teaspoon (5 mL) vanilla
- 3 tablespoons (45 mL) milk
Whipped Cream Frosting:
- 2 cups (473 mL) heavy cream
- 1/4 cup (33 g) powdered sugar
- 1/8 teaspoon (0.5 g) salt
- 1 teaspoon (5 mL) vanilla extract
Instructions
1. Prepare the Natural Dyes
- Juice beets in a juicer or use the liquid from canned beets.
- Juice carrots in a juicer or use store-bought carrot juice.
- Juice spinach in a juicer.
- Microwave 1/4 cup (25 g) frozen blueberries in 30-second intervals until they burst, then strain out 1+ tablespoon (15+ mL) blueberry juice.
- Microwave 1/4 cup (25 g) frozen blackberries in 30-second intervals until they burst, then strain out 1+ tablespoon (15+ mL) blackberry juice.
2. Prepare the Cake Batter
- Preheat oven to 350°F (175°C).
- Cream the butter, oil, and sugar in a large mixing bowl until light and fluffy.
- Add the egg whites and beat well.
- Mix in vanilla, 1 cup (237 mL) milk, and yogurt.
- In a separate bowl, whisk together the flour, baking powder, and baking soda.
- Gradually add the dry ingredients to the wet ingredients, alternating with the remaining milk.
3. Color the Cake Batter
- Divide the cake batter into six equal portions (about 1/2 cup per bowl).
- Mix in the natural dye for each bowl:
- Red: 2 tablespoons (30 mL) beet juice
- Orange: 1 1/2 tablespoons (20 mL) carrot juice
- Yellow: 1 egg yolk + 1 tablespoon (15 mL) milk
- Green: 1 tablespoon (15 mL) spinach juice
- Blue: 1 tablespoon (15 mL) blueberry juice
- Purple: 1 tablespoon (15 mL) blackberry juice
- If needed, adjust the color intensity by adding more juice.
4. Bake the Cake Layers
- Grease and flour six 5.5-inch cake pans (or bake in batches).
- Pour each colored batter into a separate pan.
- Bake for 10-15 minutes, or until the cake springs back when touched and a toothpick inserted in the center comes out clean.
- Cool for 5 minutes in the pan, then invert onto wire racks to cool completely.
5. Make the Buttercream Frosting
- In a large bowl, beat butter, powdered sugar, vanilla, and milk until smooth.
- Adjust the consistency by adding more powdered sugar (for thickness) or milk (for softness).
6. Make the Whipped Cream Frosting
- Beat heavy cream, powdered sugar, and salt at medium speed until stiff peaks form.
- Fold in vanilla extract.
7. Assemble the Cake
- Place the purple layer on a serving platter.
- Spread 2 spoonfuls of buttercream frosting evenly on top.
- Repeat with the blue, green, yellow, orange, and red layers.
- Lightly freeze the cake for 5 minutes to set the frosting.
- Coat the entire cake with buttercream frosting using a knife or spatula.
- Apply whipped cream frosting for a smooth, soft finish.
- Serve immediately.
Notes
Dye Intensity: Natural dyes create pastel colors. For more vibrant hues, use concentrated juice.
Layer Size: If you don’t have 6 cake pans, bake in batches or use cupcake tins for mini rainbow cakes.
Storage: Store in the refrigerator for up to 3 days in an airtight container.
- Prep Time: 1 hour 30 mins
- Cook Time: 15 mins
- Category: Cake
- Method: Baking
- Cuisine: American
Nutrition
- Serving Size: 1 slice
- Calories: 420
- Sugar: 46g
- Sodium: 210mg
- Fat: 18g
- Saturated Fat: 11g
- Unsaturated Fat: 5g
- Trans Fat: 0g
- Carbohydrates: 62g
- Fiber: 2g
- Protein: 6g
- Cholesterol: 65mg
I made this for my daughter’s birthday, and she was amazed!
What a fun way to bake with kids. Messy but totally worth it.
Turned out super well, the dyes worked perfectly and the cake was delicious. Thanks for a great recipe!
Oh my god, this is incredible!
Fab work! The synthetic dyes are scary! Love your natural dyes!
Love this!
Thanks for the recipe!
I’ve tried an alternative cake recipe with buttermilk and whole eggs, I then used beet juice and carrot juice for red and carrot cake layers (I’m trying to make the rainbow cake for my sister’a tenth bday in 3 days) but they both turned out very yellow.
I’ll be trying your recipe tomorrow night for my next two layers!
P.s. I’ve never baked so many layers before! Haha
Fantastic recipe, thanks so much! Beautiful and delicious!
What a gorgeous cake! Definitely truing this!
Thank you for posting this INCREDIBLE cake!! This was the ONLY cake recipe that I found using pure vegetable juices. So grateful for your efforts! Thank you thank you. The cake was delicious!
Hi! Thanks so mu h for the recipe. Love this, and it turned out so pretty!
Ok ok I need to make this again today, made it a few years back and it was fantastic! Just came back to check on the recipe.
Thank you for posting this!! I made for my daughters birthday, and it was a huge success!
Love this cake! It tastes good and i so pretty with its delicate colors!
I am a vegetarian and don’t eat eggs . What can I use instead of the egg yolks for the yellow colour ?
Turmeric powder apparently works well
Perfect result, the dyes are so great, and the falvors are delicious!
I was unsure of making a synthetic rainbow cake for my mum’s birthday, who loves natural and hates chemical colouring, but this is perfect.
Has anyone tried this recipe without sugar or a a healthier substitute like dates? I’m planning to make this for a baby birthday party.
Very happy to read about using natural colouring for cakes… will definitely give it a try
Have you tried red cabbage at all? The science in it is brilliant when you mix it with acid or Base substances like lemon juice or baking soda. But I’ve never tried it in baking, so I’m not sure how it would work.
I made this for my sons bday using you recommended dyes but a different white cake recipe. It was so cute!! I definitely should have added more carrot juice and beet juice (the beet really decreased in color when it cooked). My son loved it and it was so fun to use natural coloring. Thanks!
Thanks for the cake recipe! I made it today as a 5 layer cake and multiplied the recipe by 1.5 to make it a bit bigger so it could fit 8” springforms. The flavor and texture came out great. I used a magicbullet to blend the blueberries, blackberries, and beets and then strained them to get the juice out. The blue and purple looked closeish to your images but not as bright. The beets didn’t juice well in the magicbullet/straining approach so I guess having a juicer for those would be key. I added a tiny bit of water to get more juice out and the mixture looked really red before I baked it but when it was done baking it looked hardly light pink. Overall the cake was a huge success. I’m very happy I found the recipe and took the time to make it. The one major change I made was to make cream cheese frosting instead of buttercream but that was just because I prefer that flavor. The whipped cream came out super. Thank you!
Awesome! thanks for this recipe.
try using kurkuma for a bright yellow colour
I’m wondering how many cupcakes this would make? Thanks!
Hi Kelsey, I googled “natural dye rainbow cake” and was so excited to find your page and recipe. I have been wanting to do this for some time so to have instructions to follow is fantastic! I’m planning on making two rainbow cakes for my twins’ first birthdays. I have the Wilton layer cake tins so can bake all layers at once. I was thinking of baking in advance, doing multiples of each colour, and freezing.
Thanks for the recipe! I multiplied by 6 for a wedding cake; possibly the longer cooking times were responsible for muted colours. The spinach was great, but the blue was grey and the red was orange and the orange yellow. Still looked great though, and I’m inspired to experiment further. Blackcurrant works as well as blueberry. I also enjoyed adding different flavours to each cake – almond essence,caraway and lemon etc.
Denise, thank you so much for your comment. I am so glad you liked the cake and I’m happy to know that it worked in a 9-inch pan. 350 degrees is the correct temp — sorry I forgot to mention that. When I make it again I plan to make a larger version so now I know to triple the cake batter! :)
Kathy, I was given my Grandma’s 5 1/2 -inch round cake pan and I love it. I use it all of the time for the top tier of cakes. It was also perfect for this cake because I was just making it for a small group and didn’t want to make multiple batches of cake to fill the larger pans. However, you can double or triple the cake recipe as needed to fill 8 or 9-inch pans if you prefer that or are baking for a large group. As you can see in the pictures above, the batter did spread out and baked into flat layers. I gently tapped the cake pan with the batter onto the counter to spread the batter out a little bit and remove excessive air bubbles prior to placing it in the oven. Ideally, one would have enough pans to bake the layers all at once (a huge time saver!) but I only have one of this size pan so I baked them separately and washed the pan in between. So, it took me longer but fortunately the cake at this size cooks fairly quickly. I hope this answers all of your questions!
Thanks for the recipe and instructions. I just made this today! A few notes: You forgot to mention what temp to bake at so I did 350 F. I also had bigger cake pans (9″) and feeding a bigger crowd, so I ended up tripling the recipe to accomdate the larger pans. Can’t taste the veggie juice in the cake at all! Thanks again for the post.
Milena,
I’m glad you like the cake. The additional 2/3 cup milk is the amount of remaining liquid that should be in the batter. The natural liquid dyes are used in place of that milk. For the size of cake rounds that I used there would be some remaining batter so you would either need to add 4 1/2 Tbsp of dye or milk to reach the right consistency. And just to note, this cake recipe is more on the dense side anyway. Sorry for the confusion!
I didn’t have a round cake tin so just used my square one & followed the recipe closely. http://i34.photobucket.com/albums/d111/bouschka/IMG_2511.jpg It’s beautiful!!!
My wife was so impressed!
If I wanted to make more vibrant colors, could I sub some of the milk in the cake recipe for more of the juice – for extra color? Has anyone tried this?
I have not worked with purple sweet potato juice so I’m not sure if that will work or not. When I’ve tried sweet potato/yam the color was very faint but I would love to know how it turned out for you for blue/purple. I use measuring spoon Tablespoons.
Thank you for sharing this recipe. I am gonna make it for my sister’s birthday. im wondering, can i use purple sweet potato juice fo the blue/purple color? thank you..
Oh i forgot this. in this recipe are you using regular tablespoon, or tablespoon in the measuring spoon? thank you in advance
Belinda,
You could definitely make this the day before. Especially if you use whipped cream frosting I would be sure to refrigerate it (if you are icing it the day before).
Love your rainbow cake, just wondering if this can be made the day before a bday party? Would you ice the cake the day before?
thanks
Belinda
Hi Kelsey. It’s my 1st time on this site and I really like the rainbow cake recipe (and my husband too).
I did it for my little 6 years old brother. and it was delicious.
Sorry for my English, I’m from Argentina.
Dear Kelsey, THANKS so much for this recipe and all your ideas, I will definatelly use this kind of natural colourings, I’ve been looking for an alternatives to syntetic colours for a while and you just made my day!!!! My next rainbow cake is dedicated to you!! <3
I love this – what a wonderful way to have your cake and eat it too! Gorgeous – I am definitely trying this one out. Thank you so much for this recipe!
Trying to change to healthy cooking and baking. This is good stuff.
Kelsey,
Awesome natural dye suggestions!
It is great to know what works best and what not based on your trials…
Thank you!
Thanks, Alexia. Priya, I love your idea for a rainbow cheesecake. And Michael, thank you for all of the other natural dye suggestions. I am especially intrigued by the pandan juice and the annato seeds!
This is seriously cool: thank you!
Beautiful cake:) thanks for the recipe
We use a lot of pandanjuice (fresh pandan leaves blended/or pounded with a little water. Not only is the colour bright green(best to use a strong blender) also the fantastic aroma is so suitable for all cakes. Annato seeds are beautiful yellow. One of our clients is Chr. Hansen , the leading company in the world on bright natural derived colors obtained from hibiscus, turmeric etc.
Nice article , keep up baking and enjoy
Kelsey this looks fabulous! I love the natural dyes and the next time,. I will be using your idea for my next time- but here’s a look see at my first attempt at a rainbow cheese cake :) –
http://priyasnowserving.blogspot.com/2011/09/celebration-begins-with-rainbow.html