Added support for CSS colors names

This commit is contained in:
zenon8adams@gmail.com 2022-10-18 04:53:27 +01:00
parent 158bf4429e
commit de5d943f90
5 changed files with 528 additions and 14 deletions

View file

@ -123,6 +123,9 @@ log(chalk.blue.bgRed.bold('Hello world!'));
// Pass in multiple arguments
log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
// Use color names defined by CSS
log(chalk.color('Aquamarine')('Hello World!'));
// Nest styles
log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
@ -133,6 +136,7 @@ log(chalk.green(
' that becomes green again!'
));
// ES2015 template literal
log(`
CPU: ${chalk.red('90%')}