How to use yahoo get the hex value from YUI color picker

Hi ,
I am very new in rails and i want to develop a application like
http://www.cssmenubuilder.com/home” . The technology i am using is ROR,
Ajax, Image magick . I have two problem first how to generate on the fly
css and save it in database.Second one is regarding to colors ,I am
using yahoo user interface’s colorpicker, how can i get the hex value.
Please help.
Thanks in advance