FORCE_COLOR=[1, 2, 3]
FORCE_COLOR 环境变量用于启用 ANSI 彩色输出。
值可能是:
1、true、或空字符串''表示支持 16 色,2表示支持 256 色,或3表示支持 1600 万色。
当使用 FORCE_COLOR 并设置为支持的值时,NO_COLOR 和 NODE_DISABLE_COLORS 环境变量都将被忽略。
任何其他值都会导致彩色输出被禁用。
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,2to indicate 256-color support, or3to 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.