Skip to content

Instantly share code, notes, and snippets.

@isomorphisms
Last active August 29, 2015 14:06
Show Gist options
  • Save isomorphisms/5819d54485c0d2a5fcf0 to your computer and use it in GitHub Desktop.
Save isomorphisms/5819d54485c0d2a5fcf0 to your computer and use it in GitHub Desktop.
formatting for colorOut
library(colorout)
# The function takes numeric vectors of at most three elements each.
# The three numbers indicate, respectively, formating, background
# color and foreground color. If a vector has only one element, the
# number will be used to set the foreground color; if it has two
# elements, they will be used to set the background and foreground
# colors.
#
# The table below shows valid values and their meanings as both
# formating and color codes (some formating codes do not work
# properly in some terminal emulators):
#
# Value Formating Color
# 0 No formating Default or black
# 1 Bold or bright Red
# 2 Faint Green
# 3 Italic or inverse Yellow
# 4 Underline Blue
# 5 Blink slowly Magenta
# 6 Blink quickly Cyan
# 7 Invert White
#
# Messages are colored as errors and warnings if they start with
# ‘"Error"’ or ‘"Warning"’ (or their translations, if not running in
# an English locale).
#
#
# Author(s):
#
# Jakson A. Aquino <email: [email protected]>
setOutputColors(normal=4, #blue output
stderror=c(2,0,0), #faint/ grey
negnum=c(4,0,3) #underline (bold is c(1,0,3) )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment