Helper function to make it simple to define a table style node.

new_table_style(
  style_name,
  style_id = make_style_id(),
  text_color = "#000000",
  cell_color = "#f36633",
  border_color = "#959595",
  border_style = "sng",
  border_weight = 12700,
  row_header_text_color = text_color,
  row_total_text_color = text_color,
  col_first_text_color = text_color,
  col_last_text_color = text_color,
  row_header_cell_color = cell_color,
  row_total_cell_color = cell_color,
  col_first_cell_color = cell_color,
  col_last_cell_color = cell_color,
  cell_color_tint1 = tint_color(cell_color, tint = 0.4),
  cell_color_tint2 = tint_color(cell_color, tint = 0.2),
  major_border_color = border_color,
  major_border_style = border_style,
  major_border_weight = border_weight * 3,
  error_call = caller_env()
)

Arguments

style_name

The new name of the style. This is what will be referenced when defining the table style..

style_id

a unique string containing 8, 4, 4, 4, then 12 random values between A-F and 0-9, separated by dashes: \\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}

text_color, cell_color, border_color, row_header_text_color, row_total_text_color, col_first_text_color, col_last_text_color, row_header_cell_color, row_total_cell_color, col_first_cell_color, col_last_cell_color, cell_color_tint1, cell_color_tint2, major_border_color

either a color name (as listed by colors()), a hexadecimal string

border_style, major_border_style

Define how borders should be styled. Options include: "sng","dbl","thickThin","thinThick","tri"

border_weight, major_border_weight

Define the thickness of the borders. Must be a value between 0 and 20116800.

error_call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.