powered by
Colors can be in any format understood by R:
A color name like "darkred"
"darkred"
A HTML string like "#FF0000"
"#FF0000"
The result of a function like rgb(1, 0, 0) or grey(0.5)
rgb(1, 0, 0)
grey(0.5)
background_color(ht)background_color(ht) <- valueset_background_color(ht, row, col, value)map_background_color(ht, row, col, fn)
background_color(ht) <- value
set_background_color(ht, row, col, value)
map_background_color(ht, row, col, fn)
A huxtable.
A character vector or matrix. Set to NA to reset to the default, which is NA_character_.
NA
NA_character_
A row specifier. See rowspecs for details.
An optional column specifier.
A mapping function. See mapping-functions for details.
Transparent colors are not guaranteed to work at present.
Other formatting functions: bold(), font(), font_size(), na_string(), number_format(), text_color()
bold()
font()
font_size()
na_string()
number_format()
text_color()
background_color(jams) <- grey(0.7) background_color(jams) set_background_color(jams, "yellow") set_background_color(jams, 2:3, 1, "yellow") map_background_color(jams, by_rows("yellow", grey(0.7)))
Run the code above in your browser using DataLab