From fc6d8f4b841bfca1b231b9975511ee54a91ef7fb Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 22 Feb 2021 10:50:01 -0800 Subject: [PATCH] doc: document the NO_COLOR and FORCE_COLOR env vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: James M Snell Fixes: https://github.com/nodejs/node/issues/37404 PR-URL: https://github.com/nodejs/node/pull/37477 Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Juan José Arboleda Reviewed-By: Rich Trott --- doc/api/cli.md | 19 +++++++++++++++++++ doc/node.1 | 20 ++++++++++++++++++++ lib/internal/main/print_help.js | 3 +++ 3 files changed, 42 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 4612a94eb5d935..a8df8b410271a0 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1264,6 +1264,19 @@ Print node's version. ## Environment variables +### `FORCE_COLOR=[1, 2, 3]` + +The `FORCE_COLOR` environment variable is used to +enable ANSI colorized output. The value may be: + +* `1`, `true`, or the empty string `''` indicate 16-color support, +* `2` to indicate 256-color support, or +* `3` to indicate 16 million-color support. + +When `FORCE_COLOR` is used and set to a supported value, both the `NO_COLOR`, +and `NODE_DISABLE_COLORS` environment variables are ignored. + +Any other value will result in colorized output being disabled. ### `NODE_DEBUG=module[,…]`