Trying to seperate the bar chart labels from the graph

I have this graph

go.Figure(
    go.Bar(
        x=df["Industry"], y=df["Total"]
    )
)

All the labels are slanty and hard to read so what I’d like to do is simply color code the bars then. I’d like to do something like this (from here) where the right hand siide (or the bottom) has these color coded boxes next to the names.