NO_COLORAn 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_COLOR to disable default color output| Software | Description | Version/Date Supported |
|---|---|---|
| alogview | Android logcat Filter | 2018-10-31 |
| Bikeshed | Spec/Document Processor | 2018-07-27 |
| Bloop | Compilation/test server for Scala and Java | 2018-07-02 |
| ColorDebug | Colorful command line output C/C++ macros | 2019-02-09 |
| colored | Rust crate for coloring terminal output | 1.7.0 |
| crayon | R package for colored terminal output | 2018-02-08 |
| deno | Secure TypeScript runtime | 0.2.11 |
| ffind | Rust utility to find files and folders | 2018-03-24 |
| forest-arborist | Manage a loosely coupled forest of git or hg repositories | 1.2.0 |
| fselect | Command-line utility for finding files with SQL-like expressions | 0.6.1 |
| gopass | Password store for teams | 1.8.0 |
| Homebrew | Package manager for macOS | 1.5.5 |
| KBSecret | Secret manager backed by Keybase and KBFS | 1.4.0 |
| kitten | Tiny multi-server automation tool | 0.2.14 |
| konch | Python shell/REPL configuration tool | 4.0.0 |
| 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 |
| Middleman | Ruby-based static site generator | 2019-02-18 |
| mu | Maildir indexer/searcher | 2019-02-02 |
| NGLess | Domain specific language for bioinformatics | 2018-10-29 |
| npm | Package manager for JavaScript | 5.8.0 |
| nvh | Node Version Helper | 4.1.0 |
| Pastel | Tiny .NET Core library for coloring console output | 1.2.0 |
| picocli | A mighty tiny Java command line interface | 3.9.0 |
| pulumi | Programming-language-based IaC framework | 0.14.3 |
| PyDERASN | Python ASN.1 DER library | 2018-02-14 |
| rsmodules | Manage your environment by the use of modulefiles | 2018-10-09 |
| smenu | Terminal selection filter | 2018-02-05 |
| Snow | Testing library for C | 2018-01-24 |
| taoup | Fortune implementation | 2018-09-10 |
| txtnish | Twtxt microblogging client | 2018-08-31 |
| twa | A tiny web auditor with strong opinions | 1.1.0 |
| undertime | Timezone coordination tool | 2018-06-06 |
NO_COLOR| Software | Method |
|---|---|
| Ansible | export ANSIBLE_NOCOLOR=true (Docs) |
| Arcanist | arc --no-ansi COMMAND (Docs) |
| Bundler | bundle COMMAND --no-color (Docs) |
| Clang | -fno-color-diagnostics (Docs) |
| Cocoapods | pod COMMAND --no-ansi (Docs) |
| fzf | fzf --color=bw or export FZF_DEFAULT_OPTS=--color=bw (Docs) |
| GCC | export GCC_COLORS= or -fno-color-diagnostics (Docs) |
| Git | git config --global color.ui false (Docs) |
| Lynx | lynx -nocolor (or show_color=never in .lynxrc) |
| Mercurial | hg --color=never (or Docs for .hgrc) |
| Midnight Commander | mc --nocolor |
| Packer | export PACKER_NO_COLOR=true |
| Radare | radare2 -e scr.color=0 |
| Ripgrep | rg --color=never |
| RSpec | export SPEC_OPTS=--no-color |
| Ruby | export RUBY_TESTOPTS=--color=never |
| The Silver Searcher | ag --nocolor (Rejected NO_COLOR Request) |
| Thor | export THOR_SHELL=Basic (Docs) |
| util-linux | touch /etc/terminal-colors.d/disable (Docs) |
| Vim | vim '+set t_Co=0' |
Why not just set $TERM to dumb or 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
instructed.
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
shown.
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 $NO_COLOR?
User-level configuration files and per-instance command-line arguments
should override $NO_COLOR.
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).