Skip to contents

The recommended theme for reports, articles, and general use. Blue typography and fine horizontal rules take their colors from Hokusai prints. Column labels sit on a blue band, body rows are striped, and color never encodes data values. No footer is added.

Usage

gt_theme_hokusai(
  data,
  palette = c("mountain", "wind", "blossom", "lake"),
  table_width = "100%",
  font_size = 14,
  stripe = TRUE,
  font_title = NULL,
  font_body = NULL,
  font_numeric = NULL,
  font_labels = NULL,
  font_stub = NULL,
  gridlines = FALSE,
  reversed = TRUE
)

Arguments

data

A gt table object.

palette

One of "mountain" (default), "wind", "blossom", or "lake". Each uses blues and paper tones extracted from a different print.

table_width

Character. Width of the table (default: "100%").

font_size

Numeric. Body font size in pixels (default: 14). Column labels and the subtitle are 2px larger, the title 8px larger, and source notes and footnotes 1px smaller.

stripe

Logical. Apply subtle alternating row shading (default: TRUE).

font_title, font_body, font_numeric, font_labels

A font family or registry key (lora, lato, georgia, roboto_slab, fira_code, host_grotesk, ibm_plex_mono). NULL uses the corresponding ekiotable.font_<role> option. Title and body then use ekioplot.font_title and ekioplot.font_text, respectively, before falling back to Lora and Lato. Numeric and label fonts inherit the resolved body font unless explicitly set or configured through their role option. Fonts must be available to the renderer; this function does not install them.

font_stub

A font family or registry key for stub (row label) cells. NULL uses the ekiotable.font_stub option and then the resolved body font, so row labels stay with the body typography unless you move them.

gridlines

Logical. Show light-gray horizontal and vertical cell rules (default: FALSE). Section and outer accent rules remain visible.

reversed

Logical. Fill column labels and spanners with the palette blue and use the palette paper color for their text and rules (default: TRUE). FALSE sets labels in dark gray on the white canvas.

Value

A styled gt table object.

Details

Four palette variants ("mountain", "wind", "blossom", "lake") pair blues with paper tones on a neutral white canvas. All palettes include a shared neutral gray scale (gray_50 to gray_900). Zebra stripes use gray_100, gridlines use gray_200, and structural dividers use gray_300.

Body text uses dark gray; subtitles and notes use a softer dark gray. Blue marks titles and summaries. Row group headings keep the body color under a blue rule. Summary rows carry no fill: a thin gray rule opens each group summary and a double blue rule opens the grand summary.

Column labels sit above the body in size and are set in semibold. Stub cells are also semibold. Families that ship semibold under a separate family name, such as Host Grotesk, are named in the label and stub font stacks so the weight resolves.

Apply the theme before any cell-specific highlighting. Font arguments and options follow gt_theme_ekio().

Examples

head(mtcars) |>
  gt::gt() |>
  gt_theme_hokusai()
mpg cyl disp hp drat wt qsec vs am gear carb
21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
18.1 6 225 105 2.76 3.460 20.22 1 0 3 1
head(mtcars) |> gt::gt() |> gt_theme_hokusai(palette = "lake", reversed = FALSE, gridlines = TRUE)
mpg cyl disp hp drat wt qsec vs am gear carb
21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
18.1 6 225 105 2.76 3.460 20.22 1 0 3 1