Skip to content

Commit

Permalink
Document #85
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 21, 2018
1 parent 255972b commit eedbbbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions index.js
Expand Up @@ -21,9 +21,7 @@ if ('FORCE_COLOR' in env) {
} else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') {
forceColor = 0;
} else {
forceColor = env.FORCE_COLOR.length === 0 ?
1 :
Math.min(parseInt(env.FORCE_COLOR, 10), 3);
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
}
}

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -58,7 +58,7 @@ The `stdout`/`stderr` objects specifies a level of support for color through a `

It obeys the `--color` and `--no-color` CLI flags.

Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.

Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.

Expand Down

0 comments on commit eedbbbd

Please sign in to comment.