Below is the command to call the function.
colorFade('divid', 'background', 'ece7b4', 'f9bcbc', 25, 30)
The first parameter is the id of the element you are targeting. The second is the property to fade which can be the background, border or text. The third is the hex value of the starting color. The third is the hex value to fade to. The fourth and fifth are both optional. The first is the the number of times to divide the color difference and the last is the transition speed.
This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the creative commons license. Community support is available here. Paid support is also available, contact me for details.
Update 5/5/2008 – I have tweaked a few things and integrated some performance improvements based on Nate’s suggestions.