crayon v1.3.2


Monthly downloads



by Gabor Csardi

Colored Terminal Output

Colored terminal output on terminals that support 'ANSI' color and highlight codes. It also works in 'Emacs' 'ESS'. 'ANSI' color support is automatically detected. Colors and highlighting can be combined and nested. New styles can also be created easily. This package was inspired by the 'chalk' 'JavaScript' project.

Functions in crayon

Name Description
col_strsplit Split an ANSI colored string
has_color Does the current R session support ANSI colors?
col_substr Substring(s) of an ANSI colored string
crayon Colored terminal output
drop_style Remove a style
combine_styles Combine two or more ANSI styles
concat Concatenate character vectors
col_nchar Count number of characters in an ANSI colored string
col_substring Substring(s) of an ANSI colored string
chr Convert to character
style Add style to a string
strip_style Remove ANSI escape sequences from a string
num_colors Number of colors the terminal supports
has_style Check if a sting has some ANSI styling
styles ANSI escape sequences of crayon styles
start.crayon Switch on or off a style
make_style Create an ANSI color style
show_ansi_colors Show the ANSI color table on the screen
No Results!

Last month downloads


License MIT + file LICENSE
LazyData true
Collate 'ansi-256.r' 'combine.r' 'string.r' 'utils.r' 'crayon-package.r' 'disposable.r' 'has_ansi.r' 'has_color.r' 'styles.r' 'machinery.r' 'parts.r' 'print.r' 'style-var.r' 'show.r' 'string_operations.r'
RoxygenNote 5.0.1
Encoding UTF-8
NeedsCompilation no
Packaged 2016-06-28 17:18:56 UTC; gaborcsardi
Repository CRAN
Date/Publication 2016-06-28 20:16:37

Include our badge in your README