const RESET = "\u001B[0m"; const RED = "\u001B[31m"; const YELLOW = "\u001B[33m"; const CYAN = "\u001B[36m"; const GREEN = "\u001B[32m"; const DIM = "\u001B[2m"; const isColorEnabled = typeof process !== "undefined" && process.stdout?.isTTY && !("NO_COLOR" in (process.env ?? {})); function apply(color: string, value: string): string { if (!isColorEnabled) return value; return `${color}${value}${RESET}`; } export const colors = { reset: RESET, red: (value: string) => apply(RED, value), yellow: (value: string) => apply(YELLOW, value), cyan: (value: string) => apply(CYAN, value), green: (value: string) => apply(GREEN, value), dim: (value: string) => apply(DIM, value), };