Holoviews renderer Bokeh Theme

I am using the bokeh renderer and want to style the embeded plot with Theme from bokeh.themes.theme. (Example here)

Is there an Overview of attributes to change somewhere? I only find the attributes provided in the example and these are not very much.

I would also like to know the full list.

But maybe the the source at https://github.com/bokeh/bokeh/tree/master/bokeh/themes or the below is enough to get inspiration from


from bokeh import themes as bokeh_themes
from awesome_panel.styler import themes

WHITE = "#ffffff"
DARK_100 = "#303030"
DARK_75 = "#393939"
DARK_50 = "#424242"
DARK_25 = "#4d4d4d"
TEXT_DIGITAL_DARK = "#ececec"

MATERIAL_DARK_JSON = {
    "attrs": {
        "Figure": {
            "background_fill_color": DARK_50,
            "border_fill_color": DARK_100,
            "outline_line_color": DARK_75,
            "outline_line_alpha": 0.25,
        },
        "Grid": {"grid_line_color": TEXT_DIGITAL_DARK, "grid_line_alpha": 0.25},
        "Axis": {
            "major_tick_line_alpha": 0,
            "major_tick_line_color": TEXT_DIGITAL_DARK,
            "minor_tick_line_alpha": 0,
            "minor_tick_line_color": TEXT_DIGITAL_DARK,
            "axis_line_alpha": 0,
            "axis_line_color": TEXT_DIGITAL_DARK,
            "major_label_text_color": TEXT_DIGITAL_DARK,
            "major_label_text_font": "roboto, sans-serif, Verdana",
            "major_label_text_font_size": "1.025em",
            "axis_label_standoff": 10,
            "axis_label_text_color": TEXT_DIGITAL_DARK,
            "axis_label_text_font": "roboto, sans-serif, Verdana",
            "axis_label_text_font_size": "1.25em",
            "axis_label_text_font_style": "normal",
        },
        "Legend": {
            "spacing": 8,
            "glyph_width": 15,
            "label_standoff": 8,
            "label_text_color": TEXT_DIGITAL_DARK,
            "label_text_font": "roboto, sans-serif, Verdana",
            "label_text_font_size": "1.025em",
            "border_line_alpha": 0,
            "background_fill_alpha": 0.25,
            "background_fill_color": DARK_75,
        },
        "ColorBar": {
            "title_text_color": TEXT_DIGITAL_DARK,
            "title_text_font": "roboto, sans-serif, Verdana",
            "title_text_font_size": "1.025em",
            "title_text_font_style": "normal",
            "major_label_text_color": TEXT_DIGITAL_DARK,
            "major_label_text_font": "roboto, sans-serif, Verdana",
            "major_label_text_font_size": "1.025em",
            "background_fill_color": DARK_75,
            "major_tick_line_alpha": 0,
            "bar_line_alpha": 0,
        },
        "Title": {
            "text_color": TEXT_DIGITAL_DARK,
            "text_font": "roboto, sans-serif, Verdana",
            "text_font_size": "1.15em",
        },
    }
}

MATERIAL_LIGHT_JSON = {
    "attrs": {
        "Axis": {
            "major_label_text_font": "roboto, sans-serif, Verdana",
            "major_label_text_font_size": "1.025em",
            "axis_label_standoff": 10,
            "axis_label_text_font": "roboto, sans-serif, Verdana",
            "axis_label_text_font_size": "1.25em",
            "axis_label_text_font_style": "normal",
        },
        "Legend": {
            "spacing": 8,
            "glyph_width": 15,
            "label_standoff": 8,
            "label_text_font": "roboto, sans-serif, Verdana",
            "label_text_font_size": "1.025em",
        },
        "ColorBar": {
            "title_text_font": "roboto, sans-serif, Verdana",
            "title_text_font_size": "1.025em",
            "title_text_font_style": "normal",
            "major_label_text_font": "roboto, sans-serif, Verdana",
            "major_label_text_font_size": "1.025em",
        },
        "Title": {"text_font": "roboto, sans-serif, Verdana", "text_font_size": "1.15em",},
    }
}


BOKEH_THEMES = {
        themes.DEFAULT: bokeh_themes._caliber.json,
        # themes.CALIBER: themes._caliber.json,
        # themes.DARK_MINIMAL: themes._dark_minimal.json,
        # themes.LIGHT_MINIMAL: themes._caliber.json,
        themes.MATERIAL_LIGHT: MATERIAL_LIGHT_JSON,
        themes.MATERIAL_DARK: MATERIAL_DARK_JSON,
    }
1 Like