textcolor | R Documentation |
If R is not currently running in a system that supports terminal colours the text will be returned unchanged.
textcolor(text, fg = "red", bg = NULL)
text |
character vector |
fg |
foreground colour, defaults to white |
bg |
background colour, defaults to transparent |
Allowed colours are: black, blue, brown, cyan, dark gray, green, light blue, light cyan, light gray, light green, light purple, light red, purple, red, white, yellow
testthat package
print(textcolor("Red", "red")) cat(textcolor("Red", "red"), "\n") cat(textcolor("White on red", "white", "red"), "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.