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

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?

1 Like

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. ↩︎

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.