Javascript

Colors in Javascript console 1

adding %c before text will print the text with css rules that are defined in next string argument in console.log invocation. Works in Chrome 24+ and Firefox +31

console.log('%c Oh my heavens! ', 'background: #222; color: #bada55', 'more text');

References


  1. google chrome - Colors in JavaScript console - Stack Overflow ↩︎