Skip to content

resolveUseColour

resolveUseColour(input): boolean

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/config/colour.ts:40

Resolve the effective colour setting from the four-rung precedence ladder, highest wins:

  1. FORCE_COLOR is set — "0" or "false" turn colour OFF, ANY other value (including the empty string) turns it ON. This rung outranks everything below it, NO_COLOR included.
  2. NO_COLOR is set and non-empty — colour OFF (the no-color.org convention: the variable’s presence is the signal, its value is not, but an empty value does not count as set).
  3. useColour was set explicitly in config — use it verbatim.
  4. Otherwise auto-detect — colour ON when stdout is a terminal, OFF when it is piped or redirected, so captured output stays clean without any configuration.

UseColourInput

boolean