A dense monospace theme in the register of a trading terminal. Dark background, amber labels, a rule on every row, and tight padding.
Usage
gt_theme_terminal(
gt_object,
accent = "#FFB86C",
density = c("compact", "comfortable", "social"),
...
)Arguments
- gt_object
A
gttable object to modify.- accent
Character. A hex color for the column labels, row groups, and the top rule. Defaults to amber
"#FFB86C";"#7EE787"gives a green-phosphor variant.- density
Character. The type and padding scale. One of
"comfortable","compact", or"social". See Density. Defaults to"compact".- ...
Additional arguments passed to
gt::tab_options, applied last so they override anything the theme sets.
Details
The monospace face has fixed-width digits already, so numeric columns line up without any extra formatting.
Density
density sets the type and padding scale together. "comfortable" uses a
14px body with roomy rows, "compact" a 12px body with tight rows, and
"social" a 17px body with generous rows and a larger title, at the scale
gt_save_crop() and gt_social_crop() export at.
See also
pal_midnight for a color scale that survives a dark ground.
Examples
library(gt)
afc <- subset(
sdv_example_standings, conference == "AFC",
c(team_name, wins:points_against)
)
gt(head(afc, 12)) |> gt_theme_terminal()
east <- subset(
sdv_example_standings, league == "nba" & conference == "Eastern",
c(team_name, wins, losses, win_pct:points_against)
)
gt(east) |> gt_theme_terminal(accent = "#7EE787")

