DashForge / Appearance & branding

Guide & API reference

Appearance &
branding.

DashForge starts with a dark presentation, then gives you a light theme and precise control over every prominent dashboard surface. Start broad, then override only what the report needs.

API reference

set_theme

set_theme(theme)

Applies DashForge’s built-in "dark" or "light" theme. A theme updates the background, chart surfaces, text colors, borders, and accent settings as one coherent set.

Pattern 1 — use the default dark dashboard

A new Dashboard() begins with dark-oriented defaults. No call is necessary when that visual direction fits.

dashboard = Dashboard()
# Dark defaults are already active.

Pattern 2 — switch the full dashboard to light

dashboard.set_theme("light")

Pattern 3 — choose a base, then brand it

Call set_theme() first, then set_colors(). This gives unspecified colors sensible theme values.

dashboard.set_theme("light")
dashboard.set_colors(line="#0F766E", HeaderBG="#ECFDF5")

Constraint: only "dark" and "light" are valid. Any other value raises ValueError.

API reference

set_colors

set_colors(line=None, behindchart=None, ...)

Overrides one or more colors without resetting values you leave out. Use CSS color values such as hex codes, named colors, or other values accepted by the underlying color type.

Pattern 1 — change the accent only

dashboard.set_colors(line="#2563EB")

Pattern 2 — brand the main dashboard surfaces

dashboard.set_colors(
    line="#0F766E",
    HeaderBG="#ECFDF5",
    KPIBackgroundArea="#D1FAE5",
    ChartAreaBackground="#F0FDFA",
    ChartBorder="#5EEAD4",
)

Pattern 3 — make Plotly charts match the shell

dashboard.set_colors(
    behindchart="#101827",
    outterChart="#101827",
    innerChart="#101827",
    ChartText="#F8FAFC",
)
Color argument reference
lineAccent for headings and borders.behindchartPage-level dashboard background.outterChartPlotly figure background.innerChartPlotting-area background.ChartTextText inside Plotly charts.HeaderBGHeader and footer background.KPIBackgroundAreaBackground behind KPI cards.KPICardIndividual KPI card background.KPITextKPI value text.ChartAreaBackgroundBackground behind chart cards and the dataset page card.MaximizeButtonMaximize button text.ChartBorderChart card border and dataset table cell borders.

Dataset colors: the dataset page uses ChartAreaBackground for its surrounding card, KPICard for table data rows, outterChart for the filter area, ChartText for table text, ChartBorder for table borders, and line for the table header accent. Use these together when matching the data page to your dashboard.

API reference

set_font_family

set_font_family(font_family)

Sets the CSS font-family list used throughout the generated dashboard. The default is "Arial, sans-serif". CSS reads the list from left to right: it tries the first font; if that font is unavailable on a viewer’s device, it tries the next one; the final generic family is a dependable fallback.

Pattern 1 — one named font

A single font name is accepted, but it is safest only when you control the environment and know the font is installed.

dashboard.set_font_family("Arial")

Pattern 2 — preferred font plus one fallback

dashboard.set_font_family("Trebuchet MS, sans-serif")

Pattern 3 — several fallbacks

You can include more than two entries. This is useful when a brand font is not guaranteed to be installed.

dashboard.set_font_family(
    "Aptos, Segoe UI, Arial, sans-serif"
)

Tip: separate entries with commas. Include a generic family such as sans-serif, serif, or monospace last so every device has a usable final choice.

Next

Add the reporting details

KPIs and a dataset page complete a dashboard that needs both an executive summary and access to its source rows.

KPIs, data & running →