colors : { default : any ; BackgroundColor : BackgroundColor ; Color : Color ; ForegroundColor : ForegroundColor ; Instance : Instance ; Level : Level ; Modifiers : Modifiers ; bgBlack : Chalk ; bgBlackBright : Chalk ; bgBlue : Chalk ; bgBlueBright : Chalk ; bgCyan : Chalk ; bgCyanBright : Chalk ; bgGray : Chalk ; bgGreen : Chalk ; bgGreenBright : Chalk ; bgGrey : Chalk ; bgMagenta : Chalk ; bgMagentaBright : Chalk ; bgRed : Chalk ; bgRedBright : Chalk ; bgWhite : Chalk ; bgWhiteBright : Chalk ; bgYellow : Chalk ; bgYellowBright : Chalk ; black : Chalk ; blackBright : Chalk ; blue : Chalk ; blueBright : Chalk ; bold : Chalk ; cyan : Chalk ; cyanBright : Chalk ; dim : Chalk ; gray : Chalk ; green : Chalk ; greenBright : Chalk ; grey : Chalk ; hidden : Chalk ; inverse : Chalk ; italic : Chalk ; level : Level ; magenta : Chalk ; magentaBright : Chalk ; red : Chalk ; redBright : Chalk ; reset : Chalk ; stderr : Chalk & { supportsColor : false | ColorSupport ; } ; strikethrough : Chalk ; supportsColor : false | ColorSupport ; underline : Chalk ; visible : Chalk ; white : Chalk ; whiteBright : Chalk ; yellow : Chalk ; yellowBright : Chalk ; ansi ( code ) => Chalk ; ansi256 ( index ) => Chalk ; bgAnsi ( code ) => Chalk ; bgAnsi256 ( index ) => Chalk ; bgHex ( color ) => Chalk ; bgHsl ( hue ,
saturation ,
lightness ) => Chalk ; bgHsv ( hue ,
saturation ,
value ) => Chalk ; bgHwb ( hue ,
whiteness ,
blackness ) => Chalk ; bgKeyword ( color ) => Chalk ; bgRgb ( red ,
green ,
blue ) => Chalk ; hex ( color ) => Chalk ; hsl ( hue ,
saturation ,
lightness ) => Chalk ; hsv ( hue ,
saturation ,
value ) => Chalk ; hwb ( hue ,
whiteness ,
blackness ) => Chalk ; keyword ( color ) => Chalk ; rgb ( red ,
green ,
blue ) => Chalk ; } Type declaration Background Color : BackgroundColor Color : Color Foreground Color : ForegroundColor Modifiers : Modifiers Readonly
bg Black : Chalk Readonly
bg Black Bright : Chalk Readonly
bg Blue : Chalk Readonly
bg Blue Bright : Chalk Readonly
bg Cyan : Chalk Readonly
bg Cyan Bright : Chalk Readonly
bg Gray : Chalk Readonly
bg Green : Chalk Readonly
bg Green Bright : Chalk Readonly
bg Grey : Chalk Readonly
bg Magenta : Chalk Readonly
bg Magenta Bright : Chalk Readonly
bg Red : Chalk Readonly
bg Red Bright : Chalk Readonly
bg White : Chalk Readonly
bg White Bright : Chalk Readonly
bg Yellow : Chalk Readonly
bg Yellow Bright : Chalk Readonly
black : Chalk Readonly
black Bright : Chalk Readonly
blue : Chalk Readonly
blue Bright : Chalk Readonly
bold : Chalk Readonly
cyan : Chalk Readonly
cyan Bright : Chalk Readonly
dim : Chalk Readonly
gray : Chalk Readonly
green : Chalk Readonly
green Bright : Chalk Readonly
grey : Chalk Readonly
hidden : Chalk Readonly
inverse : Chalk Readonly
italic : Chalk Readonly
magenta : Chalk Readonly
magenta Bright : Chalk Readonly
red : Chalk Readonly
red Bright : Chalk Readonly
reset : Chalk stderr : Chalk & { supportsColor : false | ColorSupport ; } Readonly
strikethrough : Chalk Readonly
underline : Chalk Readonly
visible : Chalk Readonly
white : Chalk Readonly
white Bright : Chalk Readonly
yellow : Chalk Readonly
yellow Bright : Chalk ansi : functionansi ( code ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:226 ansi256 : functionansi256 ( index ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:231 bg Ansi : functionbg Ansi ( code ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:288 bg Ansi256 : functionbg Ansi256 ( index ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:293 bg Hex : functionbg Hex ( color ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:245 bg Hsl : functionbg Hsl ( hue , saturation , lightness ) : Chalk Parameters hue : number saturation : number lightness : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:269 bg Hsv : functionbg Hsv ( hue , saturation , value ) : Chalk Parameters hue : number saturation : number value : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:274 bg Hwb : functionbg Hwb ( hue , whiteness , blackness ) : Chalk Parameters hue : number whiteness : number blackness : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:279 bg Keyword : functionbg Keyword ( color ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:259 bg Rgb : functionbg Rgb ( red , green , blue ) : Chalk Parameters red : number green : number blue : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:264 hex : functionhex ( color ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:184 hsl : functionhsl ( hue , saturation , lightness ) : Chalk Parameters hue : number saturation : number lightness : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:208 hsv : functionhsv ( hue , saturation , value ) : Chalk Parameters hue : number saturation : number value : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:213 hwb : functionhwb ( hue , whiteness , blackness ) : Chalk Parameters hue : number whiteness : number blackness : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:218 keyword : functionkeyword ( color ) : Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:198 rgb : functionrgb ( red , green , blue ) : Chalk Parameters red : number green : number blue : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:203 Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:69 Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:405
Main Chalk object that allows to chain styles together. Call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that
chalk.red.yellow.green
is equivalent tochalk.green
.