FORCE_COLOR=[1, 2, 3]


FORCE_COLOR 环境变量用于启用 ANSI 彩色输出。其值可以是:

【The FORCE_COLOR environment variable is used to enable ANSI colorized output. The value may be:】

  • 1true 或空字符串 '' 表示支持 16 色。
  • 2 表示支持 256 色,或者
  • 3 表示支持 1600 万色。

当使用 FORCE_COLOR 并设置为支持的值时,NO_COLORNODE_DISABLE_COLORS 环境变量将被忽略。

【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.】