Skip to content

ANSI_COLORS

const ANSI_COLORS: object

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/consoleUtils.ts:39

ANSI color codes — the 16-colour slots only, deliberately. A 16-colour slot is rendered with the user’s OWN terminal theme colour, so output looks native in light and dark schemes alike; a 256-colour or 24-bit escape would pin us to one palette and clash with half of them.

Exported so the surfaces that build their own pre-styled blocks (rather than passing a whole message through colorText) still draw from this one table — see core/launchBanner.ts, which paints only the face half of each banner row.

as const because packages/core publishes "./*.js": "./dist/*.js", so this is PUBLIC API of a published package: without it any consumer could assign ANSI_COLORS.magenta and repaint the whole CLI from the outside. Read-only, one table, no remote control.

readonly dim: “\u001b[2m” = ‘\x1b[2m’

readonly green: “\u001b[32m” = ‘\x1b[32m’

readonly magenta: “\u001b[35m” = ‘\x1b[35m’

readonly red: “\u001b[31m” = ‘\x1b[31m’

readonly reset: “\u001b[0m” = ‘\x1b[0m’

readonly yellow: “\u001b[33m” = ‘\x1b[33m’