Last active
August 29, 2015 14:14
-
-
Save paveltimofeev/df23534e39e783f909a3 to your computer and use it in GitHub Desktop.
Colored Output for NodeJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 0m - WHITE ON BLACK | |
// 32m GREEN | |
console.log( '\x1b[0m\x1b[32m%s\x1b[0m %s\x1b[0m', message1, message2 ); | |
// 31m - RED | |
console.log( '\x1b[0m\x1b[31mRed Message\x1b[0m %s\x1b[0m', message ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// codes for(b=0; b < 255; b++){ console.log( b.toString() + ' \\x' + b.toString(16) + ' ' + ( new Buffer( [b] ) ).toString() ); }