I wrote some scripts a while back that would allow me to very quickly create a gradient while working on a web site. A few months ago I added a bit more functionality, including a real-time front end to allow you to see the gradient / pattern you are working on as you change the values. Hope someone finds this useful!

http://thom-patterson.com/toys3.php