add_colored_str {mtb} | R Documentation |
Add a string with specified color or background color.
Description
add_colored_str
returns a string component generated by htmltools
with specified color and styles.
Usage
add_colored_str(
text = "",
color = c(51, 122, 183),
alpha = 255,
bgcolor = NULL,
bgalpha = 51,
fontsize = 1,
bold = FALSE,
it = FALSE
)
Arguments
text |
A string. default="". |
color |
One of
|
alpha |
An integer between 1 and 255 for text alpha. default=255. |
bgcolor |
One of
|
bgalpha |
An integer between 1 and 255 for background alpha. default=51. |
fontsize |
A real number between 0.5 and 5.0 for font size. default=1. |
bold |
A logical value for bold fonts. default= |
it |
A Boolean value for italic fonts. default= |
Value
a formatted string
Examples
add_colored_str("warning: read this message carefully.", color = c(255, 0, 0))
[Package mtb version 0.1.8 Index]