Looking for color keys, or source file for built in themes

Hello,
I am trying to create a dashboard and I am using dark_minimal as my theme. The issue is that it doesnt color the background. To workaround that, I am filling in the background like this:

curdoc().theme = 'dark_minimal'
bg_color = '#111111'
curdoc().add_root(column(row(cpu_plot, mem_plot, background=bg_color),
                         row(temp_plot, temp_data_table, background=bg_color),
                         volt_plot,
                         row(power_plot, current_plot, tvolt_plot, background=bg_color),
                         background=bg_color))

However, I cant find the exact bg_color that matches the background color of dark_minimal. How can i find the color key (or better, the ymal / json file) for dark_minimal to make a perfect match?

And if anyone would know this, is there a way to change just the background color of a built in theme?

Thank you!

curdoc().theme accepts string names for the built-in themes as convenience, but actually ultimately uses a Theme object in all cases. You can pass it your own theme:

curdoc().theme = Theme(...)

The docs linked above show how to configure a Theme with JSON or YAML that specifies the new defaults. If you want to start from the “dark minimal” JSON a basis to create your own, it is located here:

bokeh/_dark_minimal.py at branch-2.4 · bokeh/bokeh · GitHub

1 Like

Thank you so much Bryan! that solves my problem!

1 Like