xtermStyle (version 3.0.5)

style: Color termnal output

Description

Talk about the different options. style.mode, style.palette.

Usage

style(..., fg = NA, bg = NA, font = NA, mode = c("xterm-256color", "ANSI", "off"))
style.clear(...)
style.off()
style.on()

Arguments

...
Sent to cat.
fg
Foreground color i.e. color of the text. Can be any number in [0, 255] or a string such as "grey" or "dark red" (for the basic 16 colors).
bg
Background color. Takes the same values as fg.
font
A vector containg any combination of the following font styles: "normal", "bold", "underline", "blink" (renders as bold on most terminals), "inverse". Note that these may not be rendered on all terminals.
mode
Escape code mode.

Value

Nothing, sends all output to cat.

See Also

style

Examples

Run this code
style("Blue suede shoes\n", bg="blue")
style(fg="red")
cat("everything is red now!")
style(NULL)
cat("but not anymore!")

Run the code above in your browser using DataLab