Skip to content

Instantly share code, notes, and snippets.

@Neppord
Forked from zikes/RAINBOWlog.js
Last active August 29, 2015 13:57
Show Gist options
  • Save Neppord/9532207 to your computer and use it in GitHub Desktop.
Save Neppord/9532207 to your computer and use it in GitHub Desktop.
(function(){
var log = console.log;
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;';
function gen_css(){
return css + "font-size: " + (9 + ((Math.random() * 20) << 0)) + "px;"
}
console.log = function(str) {
var args = Array.prototype.slice.call(arguments);
var letters = args[0].split("");
var css = letters.map(gen_css);
args[0] = "%c" + letters.join("%c");
args.splice.apply(args,[1,0].concat(css));
return log.apply(console, args);
}
})();
@Neppord
Copy link
Author

Neppord commented Mar 13, 2014

added random height letters

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