randomColor(element,colorType), it accept 2 optional arguments, [element] is the HTML element which we apply the color on it, [colorType] is the selected type of color, I mean the font color or the background color, this argument can be only the string "color" or the string "backgroundColor". Example:
If you call this function without any arguments it returns the Hex value of the color as a string. Example:
This library was tested on FireFox 4, Chrome 12, IE 9 and worked well.
The script RandomColorChanger.js can be found with example.html page in the zip file in attachment.