Chalk adds styles to terminal strings.
chalk-string is a thin wrapper around it which allows specifying those styles
as a string. This enables user-defined or dynamic styling.
Example
import chalkString from 'chalk-string'chalkString('red')('input') // Same as: chalk.red('input')chalkString('red bold')('input') // Same as: chalk.red.bold('input')chalkString('hex-ffffff')('input') // Same as: chalk.hex('ffffff')('input')chalkString('rgb-10-20-30')('input') // Same as: chalk.rgb(10, 20, 30)('input')chalkString('invalidStyle')('input') // Invalid styles throw an error
Whether colors should be enabled/disabled, regardless of terminal support.
Colors support is automatically detected, so this is only meant to override that
default behavior.
# Standard stylesbold underline inverse reset# Those styles do not always work on Windowsdim italic hidden strikethrough# Hidden when the terminal does not support colorsvisible# Basic colorsblack red green yellow blue magenta cyan white grayblackBright redBright greenBright yellowBright blueBrightmagentaBright cyanBright whiteBright# Advanced colorshex-ffffffrgb-255-255-255# Background colorsbgBlack bgRed bgGreen bgYellow bgBlue bgMagenta bgCyan bgWhite bgGraybgBlackBright bgRedBright