An increasing number of command-line software programs output text with ANSI color escape codes by default. While some developers and users obviously prefer seeing these colors, many users don’t. Unfortunately, every new piece of software seems to have a different way of disabling colored text output and some software has no way at all.
Accepting the futility of trying to reverse this trend, an informal standard is hereby proposed:
All command-line software which outputs text with ANSI color added should check for the presence of a
NO_COLORenvironment variable that, when present (regardless of its value), prevents the addition of ANSI color.
By adopting this standard, users that prefer to have plain, non-colored text output can set one environment variable in their shell to have it automatically affect all supported software.
This website will document which software has adopted this standard and when support was added. For software that has not or will not adopt this standard, an attempt will be made to document how to otherwise disable color.
To add software to this site, clone this site’s Git repository and submit a pull request.
NO_COLORto disable default color output
|crayon||R package for colored terminal output||2018-02-08|
|Homebrew||Package manager for macOS||2018-02-12|
|LogColor||Python library for coloring output in log messages||2018-01-24|
|lr||File list generator||2018-01-29|
|mblaze||Unix utilities to deal with Maildir||2018-01-29|
|PyDERASN||Python ASN.1 DER library||2018-02-14|
|smenu||Terminal selection filter||2018-02-05|
|Snow||Testing library for C||2018-01-24|
|The Silver Searcher||
Why not just set
xterm without color support?
Or change all color definitions in the terminal to print black?
The terminal is capable of color and should be able to print color when
NO_COLOR is a hint to the software running in the terminal to suppress
addition of color, not to the terminal to prevent any color from being
It is reasonable to configure certain software such as a text editor to use color or other ANSI attributes sparingly (such as the reverse attribute for a status bar) while still desiring that other software not add color unless configured to. It should be up to the user whether color is used, not the software author.
How should configuration files and command-line arguments be processed
in the presence of
User-level configuration files and per-instance command-line arguments
A user should be able to export
$NO_COLOR in their shell configuration
file as a default, but configure a specific program in its configuration
file to specifically enable color.
This also means that software that can add color but doesn’t by default
does not need to care about
$NO_COLOR, because it will only ever be
adding color when instructed to do so (as it should be).