See names(styles), or the crayon manual for available styles.
Arguments
- string
Character vector to style.
- as
Style function to apply, either the function object, or its name, or an object to pass to
make_style().- bg
Background style, a style function, or a name that is passed to
make_style().
Examples
## These are equivalent
style("foobar", bold)
#> [1] "\033[1mfoobar\033[22m"
style("foobar", "bold")
#> [1] "\033[1mfoobar\033[22m"
bold("foobar")
#> [1] "\033[1mfoobar\033[22m"