r_colourise: Colourise text for display in the terminal.

View source: R/utilities.R

r_colouriseR Documentation

Colourise text for display in the terminal.

Description

If R is not currently running in a system that supports terminal colours the text will be returned unchanged.

Usage

r_colourise(text, color = "black")

Arguments

text

character vector

color

foreground colour, defaults to white

Details

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

Examples

# copy paste the code to the terminal
print(r_colourise("text", "red"))
r_colourise("text", "red")
c("this", "text","is colored")|>r_colourise(c("red","green","yellow"))

wagnius-GmbH/slvwagner documentation built on Jan. 19, 2025, 7:10 a.m.