I would like to be able to create a page using HTML and scripts to display text in which each character is of a different randomly generated color. With a javascript graphics library that supports the creation and use of RBG colors and the Math.random() method, it is simple to make randomly colored lines/shapes/etc, but I do not know how to apply that to text, let alone how to apply that to each individual character. Any ideas?
Share
Is the text generated by your script, or provided to it as HTML? If the former, try
<canvas>. The latter is harder; I would wrap each character in<span style="color:#rrggbb">using JavaScript (this will be slow).