Shared legend for subplots in Plotly

I’ve seen variations of this question, but nothing fits my case exactly so I’m trying.:
I want to create three subplots in Plotly that share the same legend, I use the following code:

p = [p_1; p_2; p_3]
relayout!(p, height=500, width=900, title_text="Multiple Subplots")

Where each plot is a bar plot. Is there a way to create all the subplots with the same color scheme and share the same legend?

Thank you!