Custom ggplot2 element textbox highlight

element_textbox_colorsub(
  ...,
  colorSub = NULL,
  width = grid::unit(1, "npc"),
  padding = ggplot2::margin(6, 2, 4, 2),
  margin = ggplot2::margin(1, 1, 1, 1),
  linetype = 1,
  r = grid::unit(0, "pt"),
  halign = 0.5,
  valign = 0.5
)

Details

This function is used internally by ggjammaplot() to colorize ggplot2 facet strip panel background using a named color vector supplied as colorSub.

See also

Other jam ggtext functions: element_grob.element_textbox_colorsub()