View source: R/properties-table.R
| table_background_color | R Documentation |
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)
ht |
A huxtable. |
value |
A string or |
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.
property() returns the property value(s).
set_property() and map_property() return the modified huxtable.
Other formatting functions:
background_color(),
bold(),
font(),
font_size(),
na_string(),
number_format(),
text_color()
set_table_background_color(jams, "grey95")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.