Its getting a bit off topic here, but why is strong so hated. He made a good point.
more half offtopic things:
PHP Code:
function color(str) {
var colored = "";
var splitted = str.split(" ");
for each (var i in splitted)
colored += cr() + " "+i;
return colored;
}
correct code + can be used for any cm. text
I've been trying to do this as well
PHP Code:
function cal(string) { //cal = color all letters ^_^
var text = "";
var colors = ["b", "d", "g", "r", "k"];
//text += string.charAt(17-2);
for (var i = 0; i < string.length(); i++)
// if (string.charAt(i - 1) !== "")
text += "#" + colors[(Math.floor(Math.random() * 5))] + string.charAt(i);
// else
// text += string.charAt(i);
return text;
// var colors = ["b", "d", "g", "r", "k"];
// var color = string.replace(/""/g, "_");
// var amount = color.split("_").length - 1;
// for (var i = 0; i < amount; i++)
// color = color.replace("_", "#" + colors[(Math.floor(Math.random() * 5))]);
// return color;
}
Color each letter differently, the only problem here is that it uses the standard string which includes \r\n multiple times, the result is this:

The commented things are the things I've tried, but so far I've had no succes :c
on topic:
updated script with aristocat's color method