Color Picker element into webpage

Hello everybody,

I have a page in which I would like to insert a list box that when clicked will display the color palette, so that the user will be able to select a color for a font.

I know there are controls such as the Color Picker from the YUI Library that I could use, but I’m wondering if there’s a way to construct it on my own.

Does anyone happen to know how to fill the contents of a list box with the colors of the palette?

Thank you in advance.