colors : { BackgroundColor : BackgroundColor ; Color : Color ; ForegroundColor : ForegroundColor ; Instance : colors . Instance ; Level : colors . Level ; Modifiers : Modifiers ; bgBlack : colors . Chalk ; bgBlackBright : colors . Chalk ; bgBlue : colors . Chalk ; bgBlueBright : colors . Chalk ; bgCyan : colors . Chalk ; bgCyanBright : colors . Chalk ; bgGray : colors . Chalk ; bgGreen : colors . Chalk ; bgGreenBright : colors . Chalk ; bgGrey : colors . Chalk ; bgMagenta : colors . Chalk ; bgMagentaBright : colors . Chalk ; bgRed : colors . Chalk ; bgRedBright : colors . Chalk ; bgWhite : colors . Chalk ; bgWhiteBright : colors . Chalk ; bgYellow : colors . Chalk ; bgYellowBright : colors . Chalk ; black : colors . Chalk ; blackBright : colors . Chalk ; blue : colors . Chalk ; blueBright : colors . Chalk ; bold : colors . Chalk ; cyan : colors . Chalk ; cyanBright : colors . Chalk ; dim : colors . Chalk ; gray : colors . Chalk ; green : colors . Chalk ; greenBright : colors . Chalk ; grey : colors . Chalk ; hidden : colors . Chalk ; inverse : colors . Chalk ; italic : colors . Chalk ; level : colors . Level ; magenta : colors . Chalk ; magentaBright : colors . Chalk ; red : colors . Chalk ; redBright : colors . Chalk ; reset : colors . Chalk ; stderr : colors . Chalk & { supportsColor : false | colors . ColorSupport ; } ; strikethrough : colors . Chalk ; supportsColor : false | colors . ColorSupport ; underline : colors . Chalk ; visible : colors . Chalk ; white : colors . Chalk ; whiteBright : colors . Chalk ; yellow : colors . Chalk ; yellowBright : colors . Chalk ; ansi ( code ) : colors . Chalk ; ansi256 ( index ) : colors . Chalk ; bgAnsi ( code ) : colors . Chalk ; bgAnsi256 ( index ) : colors . Chalk ; bgHex ( color ) : colors . Chalk ; bgHsl ( hue ,
saturation ,
lightness ) : colors . Chalk ; bgHsv ( hue ,
saturation ,
value ) : colors . Chalk ; bgHwb ( hue ,
whiteness ,
blackness ) : colors . Chalk ; bgKeyword ( color ) : colors . Chalk ; bgRgb ( red ,
green ,
blue ) : colors . Chalk ; default ( text ,
... placeholders ) : string ; default ( ... text ) : string ; hex ( color ) : colors . Chalk ; hsl ( hue ,
saturation ,
lightness ) : colors . Chalk ; hsv ( hue ,
saturation ,
value ) : colors . Chalk ; hwb ( hue ,
whiteness ,
blackness ) : colors . Chalk ; keyword ( color ) : colors . Chalk ; rgb ( red ,
green ,
blue ) : colors . Chalk ; } Type declaration Background Color : BackgroundColor Color : Color Foreground Color : ForegroundColor Modifiers : Modifiers Readonly
bg Black Bright : colors . Chalk Readonly
bg Blue Bright : colors . Chalk Readonly
bg Cyan Bright : colors . Chalk Readonly
bg Green Bright : colors . Chalk Readonly
bg Magenta Bright : colors . Chalk Readonly
bg Red Bright : colors . Chalk Readonly
bg White Bright : colors . Chalk Readonly
bg Yellow Bright : colors . Chalk Readonly
black Bright : colors . Chalk Readonly
green Bright : colors . Chalk Readonly
magenta Bright : colors . Chalk Readonly
strikethrough : colors . Chalk Readonly
white Bright : colors . Chalk Readonly
yellow Bright : colors . Chalk ansi : functionansi ( code ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:226 ansi256 : functionansi256 ( index ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:231 bg Ansi : functionbg Ansi ( code ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:288 bg Ansi256 : functionbg Ansi256 ( index ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:293 bg Hex : functionbg Hex ( color ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:245 bg Hsl : functionbg Hsl ( hue , saturation , lightness ) : colors . 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 ) : colors . 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 ) : colors . 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 ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:259 bg Rgb : functionbg Rgb ( red , green , blue ) : colors . Chalk Parameters red : number green : number blue : number Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:264 default : functiondefault ( text , ... placeholders ) : string Parameters text : TemplateStringsArray Rest
... placeholders : unknown [] Returns string Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:148 default ( ... text ) : string Returns string Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:150 hex : functionhex ( color ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:184 hsl : functionhsl ( hue , saturation , lightness ) : colors . 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 ) : colors . 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 ) : colors . 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 ) : colors . Chalk Defined in node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts:198 rgb : functionrgb ( red , green , blue ) : colors . 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
.