View source: R/background-color.R
background_color | R Documentation |
The background_color()
and background_subtle()
functions adjust the
background color of a tag element.
background_color(x, color)
background_subtle(x, color)
x |
A tag element or .style pronoun. |
color |
A character string specifying a color. One of,
|
An object of the same type as x
.
library(htmltools)
div(
.style %>%
background_color(theme_primary()),
"Primary background"
)
div(
.style %>%
background_color(theme_danger()),
"Danger background"
)
div(
.style %>%
background_subtle(theme_warning()) %>%
border_subtle(theme_warning()) %>%
text_emphasis(theme_warning()),
"Warning!"
)
div(
.style %>%
background_subtle(theme_dark()) %>%
border_subtle(theme_dark())
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.