Can't change go.Bar back ground to black or transparent

hi,

i am including a function that generates a go.Bar graph inside a plotly Dash app inside a bcc.Card. the problem is I am not able to change the background color of the graph to black or transparent, i tried using ‘#00000’, or rgba(0,0,0,0), with no luck. the code is shown below.

def Stats(G):
degree = nx.degree_centrality(G)
betweenness = nx.betweenness_centrality(G)
degree_df = pd.DataFrame({‘node’: [x[0] for x in sorted(degree.items(), key=lambda x:x[1], reverse=True)] , ‘Stat’:‘Degree’, ‘Value’: [x[1] for x in sorted(degree.items(), key=lambda x:x[1], reverse=True)]})
betweenness_df = pd.DataFrame({‘node’: [x[0] for x in sorted(betweenness.items(), key=lambda x:x[1], reverse=True)] , ‘Stat’:‘Betweenness’, ‘Value’: [x[1] for x in sorted(betweenness.items(), key=lambda x:x[1], reverse=True)]})
bar_df = degree_df.head(5).append(betweenness_df.head(5))[[‘node’, ‘Stat’, ‘Value’]]

    data = px.bar(bar_df, x="Stat", y="Value", color="node", title="Top Five", orientation='v')
    layout = go.Layout(title = "General Stats", 
                            template = 'plotly_dark', 
                            paper_bgcolor ='rgb(0,0,0)', plot_bgcolor='rgb(0,0,0)',
                            xaxis = go.XAxis(title = 'Dieharder Tests', showticklabels=False),)
    fig = go.Figure(data, layout)
    return fig

what could be the problem?
Thanks

You are using a RGB string, not a RGBA string…

i used rgba and it didn’t work either.

i just figured out what is the problem. in the data variable i am using px.bar instead of go.Bar. the problem with go.Bar is that i didn’t know how to set the colors automatically. in px.bar it is set easily through color = ‘node’. is there a similar way to use in go.Bar ?