1 var colors = require('../lib/index');
3 console.log('First some yellow text'.yellow);
5 console.log('Underline that text'.yellow.underline);
7 console.log('Make it bold and red'.red.bold);
9 console.log(('Double Raindows All Day Long').rainbow);
11 console.log('Drop the bass'.trap);
13 console.log('DROP THE RAINBOW BASS'.trap.rainbow);
15 // styles not widely supported
16 console.log('Chains are also cool.'.bold.italic.underline.red);
18 // styles not widely supported
19 console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse
20 + ' styles! '.yellow.bold);
21 console.log('Zebras are so fun!'.zebra);
24 // Remark: .strikethrough may not work with Mac OS Terminal App
26 console.log('This is ' + 'not'.strikethrough + ' fun.');
28 console.log('Background color attack!'.black.bgWhite);
29 console.log('Use random styles on everything!'.random);
30 console.log('America, Heck Yeah!'.america);
32 console.log('Blindingly '.brightCyan + 'bright? '.brightRed + 'Why '.brightYellow + 'not?!'.brightGreen);
34 console.log('Setting themes is useful');
39 console.log('Generic logging theme as JSON'.green.bold.underline);
40 // Load theme with JSON literal
55 console.log('this is an error'.error);
57 // outputs yellow text
58 console.log('this is a warning'.warn);
61 console.log('this is an input'.input);
63 console.log('Generic logging theme as file'.green.bold.underline);
65 // Load a theme from file
67 colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
73 console.log('this is an error'.error);
75 // outputs yellow text
76 console.log('this is a warning'.warn);
79 console.log('this is an input'.input);
81 // console.log("Don't summon".zalgo)