Skip to main content

color_enabled

Function color_enabled 

Source
pub fn color_enabled() -> bool
Expand description

Returns true when colored output should be used.

Color is enabled when ALL of the following are true:

  • NO_COLOR environment variable is not set
  • ACB_NO_COLOR environment variable is not set
  • Stdout is a TTY (interactive terminal)