table_theme_spec
table_theme_spec(
name: str,
mode: Literal['light', 'dark'] = 'light',
) -> sdvplot._table_themes.TableThemeSpec
Resolve a surveyed table theme (e.g. datagolf, wikipedia, nejm) by its source name.
Arguments
| Name | Type | Description |
|---|---|---|
name | str | The theme id, as listed by sdv_table_themes(). "espn", "fivethirtyeight" and "pff" are reactablefmtr ports (reactable_sdv_theme), not registry ids; the surveyed look of those sites is "espn-site", "fivethirtyeight-site" and "pff-site". |
mode | Literal['light', 'dark'] | "light" or "dark". Missing palette keys take the shared defaults. |
Returns
The frozen spec, with the palette complete and every {key} in the structure's border strings replaced.
Raises
InputError: For an unknown name (with up to 3 close matches), a reactablefmtr name, an unknownmode, ormode="dark"on a light-only theme (naming three dark-capable themes in the same category).
Example
from sdvplot import table_theme_spec
spec = table_theme_spec("datagolf", "dark")
print(spec.palette["bg"])
See also
- sdv_table_themes: list the available ids
- reactable_sdv_theme: reactablefmtr's own 27 themes