## Use style names
alert <- combine_ansi_styles("bold", "red4")
cat(alert("Warning!"), "\n")
## Or style functions
alert <- combine_ansi_styles(style_bold, col_red, bg_cyan)
cat(alert("Warning!"), "\n")
## Combine a composite style
alert <- combine_ansi_styles(
"bold",
combine_ansi_styles("red", bg_cyan))
cat(alert("Warning!"), "\n")
Run the code above in your browser using DataLab