Skip to contents

You can use this function to list all availables crayon styles, via names(styles()), or to explicitly apply an ANSI escape seauence to a string.

Usage

styles()

Value

A named list. Each list element is a list of two strings, named ‘open’ and ‘close’.

See also

crayon() for the beginning of the crayon manual.

Examples

names(styles())
#>  [1] "reset"         "bold"          "blurred"       "italic"       
#>  [5] "underline"     "inverse"       "hidden"        "strikethrough"
#>  [9] "black"         "red"           "green"         "yellow"       
#> [13] "blue"          "magenta"       "cyan"          "white"        
#> [17] "silver"        "bgBlack"       "bgRed"         "bgGreen"      
#> [21] "bgYellow"      "bgBlue"        "bgMagenta"     "bgCyan"       
#> [25] "bgWhite"       "pink"          "bgMaroon"     
cat(styles()[["bold"]]$close)
#>