table_background_color() sets a background color for the whole table.
Individual background_color() values override the table background.
table_background_color(ht)table_background_color(ht) <- value
set_table_background_color(ht, value)
property() returns the property value(s).
set_property() and map_property() return the modified huxtable.
A huxtable.
A string or NA. Set to NA to reset to the default, which is NA_character_.
Colors can be specified as described in background_color(). The default,
NA, leaves the table background unset.
Output formats handle table backgrounds differently:
HTML applies the color to the <table> element.
LaTeX wraps non-breakable tables in a zero-padding \colorbox.
Breakable LaTeX tables ignore the property because a longtable cannot be
placed inside a \colorbox.
Typst uses the table's fill setting. Individual cell fills override it.
RTF, Excel, Word and PowerPoint output apply the table color to cells which do not have an individual background color.
On-screen output applies the color to the whole table area, including borders. Individual cell backgrounds still override it.
Markdown output ignores the property.
Other formatting functions:
background_color(),
bold(),
font(),
font_size(),
na_string(),
number_format(),
text_color()
set_table_background_color(jams, "grey95")
Run the code above in your browser using DataLab