hex for foreground colors and bgHex for background colors). chalk.rgb(15, 100, 204).inverse('Hello!')īackground versions of these models are prefixed with bg and the first level of the module capitalized (e.g.chalk.hex('#DEADED').underline('Hello, world!').For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red). bold ( 'with a blue substring' ) + ' that becomes green again!' ) ) // ES2015 template literal log ( ` CPU: $ as a Chalk option). bgBlue ( 'world' ) + '!' ) ) // Nest styles of the same type even (color, underline, background) log ( chalk. blue ( 'Hello', 'World!', 'Foo', 'bar', 'biz', 'baz' ) ) // Nest styles log ( chalk. bold ( 'Hello world!' ) ) // Pass in multiple arguments log ( chalk. red ( '!' ) ) // Compose multiple styles using the chainable API log ( chalk. log // Combine styled and normal strings log ( chalk. Import chalk from 'chalk' const log = console.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |