GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • datapane/datapane
  • Introduction
  • Installing Datapane
  • Quickstart
  • Overview
  • Display Blocks
  • Layout Blocks
  • Overview
  • Styling
  • Jupyter Integration
  • Examples
  • Plots
  • Tables & Data
  • Text & HTML

This view

  • Original page
  • New address

GeezerVison is showing docs.datapane.com — Styling - Datapane

Styling

Datapane enables you to can change the font, background color and text alignment to match your brand guidelines or personal aesthetics. Simply override the default styling properties by passing in a Formatting object as follows:

import datapane as dp

view = dp.View("Test Message")

dp.save_report(
    view,
    path="styling-python-api.html",
    formatting=dp.Formatting(
        light_prose=False,
        accent_color="orange",
        bg_color="#EEE",
        text_alignment=dp.TextAlignment.RIGHT,
        font=dp.FontChoice.MONOSPACE,
        width=dp.Width.MEDIUM,
    )
)

There are currently six styling properties supported:

1. Light Prose

Boolean which controls whether the text appears as light (good for dark mode), or dark (default).

2. Accent Color

Controls the color of certain UI elements e.g. page titles, selects, DataTable headings. Can be any of the 140 CSS colour names or an RGB hex code.

3. Background Color

Controls the background color - can be any of the 140 CSS colour names or an RGB hex code.

4. Text Alignment

Controls how the text is aligned - can be any of JUSTIFY, LEFT (default), RIGHT, CENTER.

5. Font

Controls the font for the prose text - can be any of DEFAULT, SANS, SERIF, MONOSPACE.

6. Width

Controls the horizontal width - can be any of NARROW, MEDIUM (default), FULL.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.