File size: 411 Bytes
ffec32f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import panel as pn
import colorcet as cc

pn.extension()

CMAP_CSS = (
    "div, div:hover {background: var(--panel-surface-color); color: current}" if pn.config.theme == "dark" else ""
)

cmap = pn.widgets.ColorMap(options=cc.palette, ncols=3, swatch_width=100, margin=(0, 0, 200, 0), stylesheet=[CMAP_CSS])

pn.template.FastListTemplate(
    sidebar=[cmap],
    main_layout=None,
    theme="dark"
).servable()