panel.ui.theme module#

The Material UI design and the themes it renders.

class panel.ui.theme.MaterialDesign(theme=None, **params)[source]#

Bases: Material

Parameter Definitions


Parameters inherited from:

class panel.ui.theme.MaterialUIDesign(theme=None, **params)[source]#

Bases: MaterialDesign

Panel’s Material UI design defaults.

Parameter Definitions


Parameters inherited from:

class panel.ui.theme.MuiDarkTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: MaterialDarkTheme

Parameter Definitions


Parameters inherited from:

bokeh_theme = ClassSelector(class_=(<class 'bokeh.themes.theme.Theme'>, <class 'str'>), default=<bokeh.themes.theme.Theme object at 0x1142a2bd0>, label='Bokeh theme')

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

class panel.ui.theme.MuiDefaultTheme(*, base_css, bokeh_theme, css, name)[source]#

Bases: MaterialDefaultTheme

Parameter Definitions


Parameters inherited from:

bokeh_theme = ClassSelector(class_=(<class 'bokeh.themes.theme.Theme'>, <class 'str'>), default=<bokeh.themes.theme.Theme object at 0x1144dcce0>, label='Bokeh theme')

A Bokeh Theme class that declares properties to apply to Bokeh models. This is necessary to ensure that plots and other canvas based components are styled appropriately.

panel.ui.theme.generate_palette(color: str, n_colors: int = 3) → list[str][source]#

Generate a palette of colors from a base color.

Parameters:
colorstr

The base color to generate the palette from.

n_colorsint, optional

The number of colors to generate.

Returns:
list[str]

A list of colors in hex format.

panel.ui.theme.linear_gradient(start_hex: str, finish_hex: str, n: int = 10) → list[str][source]#

Interpolates the color gradient between to hex colors.

Parameters:
start_hexstr

The starting hex color.

finish_hexstr

The finishing hex color.

nint, optional

The number of colors to generate.

Returns:
list[str]

A list of colors in hex format.