Skip to contents

One theme from the registry listed by sdv_table_themes(): fonts, sizes, a complete palette and the structure (rules, stripes, label style), with every {key} in the structure's border strings replaced by a palette color.

Usage

table_theme_spec(name, mode = c("light", "dark"))

Arguments

name

The theme id, for example "datagolf", "wikipedia" or "nejm". "espn", "fivethirtyeight" and "pff" are reactablefmtr names, not registry ids: the surveyed look of those sites is "espn-site", "fivethirtyeight-site" and "pff-site".

mode

"light" (default) or "dark". Palette keys a theme leaves out take the shared defaults. "dark" on a light-only theme is an error that names three dark-capable themes in the same category.

Value

A list with id, source, category, fonts, sizes, palette, structure and dark_policy.

See also

Examples

spec <- table_theme_spec("datagolf", "dark")
spec$palette$bg
#> [1] "#141414"
spec$structure$rowRule
#> [1] "1px solid #1e1e1e"