10 setOutputColors
6 Blink quickly
7 Invert
The values of ANSI escape codes for 256 colors are different than the ones used in the function
setOutputColors. Run show256Colors to to get a table of the 256 colors and their codes.
Messages are colored as errors and warnings if they start with "Error" or "Warning" (or their
translations, if not running in an English locale).
If the ‘TERM’ environment variable is "fbterm", fbterm escape codes will be used instead of the
ANSI ones and the format values will be ignored.
Value
NULL.
Author(s)
Examples
# Color scheme for terminal emulator with only 8 colors:
setOutputColors(normal = 2, negnum = 3, zero = 3, number = 3,
date = 3, string = 6, const = 5, false = 5,
true = 2, infinite = 5, index = 2, stderror = 4,
warn = c(1, 0, 1), error = c(1, 7),
verbose = TRUE, zero.limit = NA)
# Color scheme for white background:
setOutputColors(normal = c(0, 0, 18), number = c(0, 0, 90),
negnum = c(0, 0, 88), date = c(0, 0, 53),
string = c(0, 0, 22), const = c(0, 0, 94), stderror = 52)
# Color schemes for black background:
setOutputColors(normal = 39, negnum = 183, zero = 114, number = 51,
date = 43, string = 79, const = 75, zero.limit = 0.1)
setOutputColors(normal = 202, number = 214, zero = 220, negnum = 209,
date = 184, string = 172, const = 179, zero.limit = 0.01)
setOutputColors(normal = 202, number = 214, zero = NA, negnum = 209,
date = 184, string = 172, const = 179, zero.limit = 0.01)
# True color example:
# The color code starts with "\x1b[" and ends with "m"
# 38;2 means "foreground"
# 48;2 means "background"
# valid values for red, green, and blue are integers between 0 and 255
setOutputColors(normal = "\x1b[38;2;0;200;0m", # red = 0; green = 200; blue = 0
negnum = "\x1b[38;2;255;200;0m",
zero = "\x1b[38;2;255;255;0m",
number = "\x1b[38;2;200;255;75m",
date = "\x1b[38;2;155;155;255m",