☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How to add 'custom color palette' in 'Custom theme'?

Community Supporttemplate
Yogesh_Jadhav
Yogesh_Jadhav

I have created some customized color palettes namely, ‘Categorical palettes’ to distinguish discrete categories of data that do not have an inherent correlation, ’ Sequential palettes’ and ’ Diverging palettes’ for relationship charts and trend charts.

I have created these palettes as plain Python list of (hex) RGB color strings similar to (’#084594’, ‘#2171b5’, ‘#4292c6’, ‘#6baed6’, ‘#9ecae1’, ‘#c6dbef’, ‘#deebf7’, ‘#f7fbff’).

I want to add these customized color palettes into ‘Custom theme’ that I am preparing.
I have referred Bokeh documentation for it but not able to figure out how to do it.

Can you please guide me in this?

⌁   Link to post
Bryan
Bryan

The question is a little unclear. There is no way to define a new “named” palette in a Theme. But themes can be used to set values for essentially any model properties. So you could e.g. set the a new default value for the LinearColormapper.palette property that is the literal list of colors. [1]


  1. This would affect all LinearColormapper instances. Currently, Bokeh themes are purely type-scoped. ↩︎

⌁   Link to post

End of archived discussion · Replies are disabled