Check if Console Supports ANSI Color Escapes
hasColorConsole()
a boolean
The hasColorConsole
function was added in version 1.1.216
of RStudio.
if (FALSE) { if (rstudioapi::hasColorConsole()) { message("RStudio console supports ANSI color sequences.") } }