Skip to content

Instantly share code, notes, and snippets.

@paveltimofeev
Last active August 29, 2015 14:14
Show Gist options
  • Save paveltimofeev/df23534e39e783f909a3 to your computer and use it in GitHub Desktop.
Save paveltimofeev/df23534e39e783f909a3 to your computer and use it in GitHub Desktop.
Colored Output for NodeJS
// 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 );
@paveltimofeev
Copy link
Author

// codes for(b=0; b < 255; b++){ console.log( b.toString() + ' \\x' + b.toString(16) + ' ' + ( new Buffer( [b] ) ).toString() ); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment