Skip to main content

colors_enabled

Function colors_enabled 

Source
pub fn colors_enabled() -> bool
Expand description

Check if colors should be enabled.

This respects standard environment variables for color control:

  • NO_COLOR=1: Disables all ANSI output (https://no-color.org/)
  • CLICOLOR_FORCE=1: Forces colors even in non-TTY
  • CLICOLOR=0: Disables colors on macOS
  • TERM=dumb: Disables colors for basic terminals