Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created March 12, 2014 23:30
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save LeaVerou/9518902 to your computer and use it in GitHub Desktop.
Save LeaVerou/9518902 to your computer and use it in GitHub Desktop.
AWESOMEify your console.log()ing! Because life is too short to be black & white!!!!!!1111one
(function(){
var log = console.log;
console.log = function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;';
var args = Array.prototype.slice.call(arguments);
args[0] = '%c' + args[0];
args.splice(1,0,css);
return log.apply(console, args);
}
})();
@zikes
Copy link

zikes commented Mar 12, 2014

@jotafeldmann
Copy link

lol! Nyan cat is here!

@tarwn
Copy link

tarwn commented Mar 13, 2014

Something critical was missing from that rainbow, Zikes's text-shadow, bigger text, and a hot-linked unicorn: https://gist.github.com/tarwn/9520722 (image: http://tiernok.com/downloads/rainbowUnicorn.png)

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