getSimpleColoredTblTheme {basictabler} | R Documentation |
Get a simple coloured theme.
Description
Get a simple coloured theme that can be used to style a table into a custom colour scheme.
Usage
getSimpleColoredTblTheme(
parentTable,
themeName = "coloredTheme",
colors = NULL,
fontName = NULL,
theme = NULL
)
Arguments
parentTable |
Owning table. |
themeName |
The name to use as the new theme name. |
colors |
The set of colours to use when generating the theme (see the Styling vignette for details). This parameter exists for backward compatibility. |
fontName |
The name of the font to use, or a comma separated list (for font-fall-back). This parameter exists for backward compatibility. |
theme |
A simple theme specified in the form of a list. See example for supported list elements (all other elements will be ignored). |
Value
A TableStyles object.
Examples
simpleOrangeTheme <- list(
fontName="Verdana, Arial",
fontSize="0.75em",
headerBackgroundColor = "rgb(237, 125, 49)",
headerColor = "rgb(255, 255, 255)",
cellBackgroundColor = "rgb(255, 255, 255)",
cellColor = "rgb(0, 0, 0)",
totalBackgroundColor = "rgb(248, 198, 165)",
totalColor = "rgb(0, 0, 0)",
borderColor = "rgb(198, 89, 17)"
)
library(basictabler)
tbl <- qtbl(data.frame(a=1:2, b=3:4))
# then
tbl$theme <- simpleOrangeTheme
# or
theme <- getSimpleColoredTblTheme(tbl, theme=simpleOrangeTheme)
# make further changes to the theme
tbl$theme <- simpleOrangeTheme
# theme set, now render table
tbl$renderTable()
[Package basictabler version 1.0.2 Index]