Themes
v0.3.0One theme system shared by every engine: the same theme name works for dashboards, slides, DataMatrix and charts. Set it globally or per export, or pass your own palette dict.
Canonical Themes
| Theme | Style / use case |
|---|---|
| corporate_blue | Clean professional blue — default for business reports |
| dark_enterprise | Dark background, high-contrast accents — dashboards |
| modern_green | Fresh green palette — sustainability, biology, health |
| void_indigo | Deep indigo gradients — research and analytics |
| glass_ocean | Light frosted-glass blues — modern product decks |
| cyberpunk_neon | Neon on dark — high-impact presentations |
Usage
themes.py
python
import viewx as vx
df = vx.load_dataset("iris.csv")
# 1. Per-export theme
vx.Dashboard.auto(df, theme="cyberpunk_neon").save("dash.html")
# 2. Global theme for the whole session
vx.set_theme("glass_ocean")
vx.plot(df, kind="donut", x="species").save("donut.html")
vx.Presentation.auto(df).save("slides.html")
# 3. Query the current theme
print(vx.get_theme())Custom Palettes
Any engine accepts a dict palette in place of a theme name:
custom.py
python
palette = {
"bg": "#0d1117",
"surface": "#161b22",
"text": "#e6edf3",
"accent": "#ff7b72",
"accent2": "#79c0ff",
"font": "Inter, sans-serif",
}
vx.Dashboard.auto(df, theme=palette).save("brand.html")API Reference
set_theme
set_theme(name)
get_theme
get_theme() -> str
str
resolve_theme
resolve_theme(name) -> ThemeSpec
ThemeSpec