Convert Hex Color Value To HTML Color

Hey everyone. I'm new to ROR, and I followed and implemented the
beginner Ruby On Rails Tutorial (2nd Edition) code, and its working
great. For those who are unfamiliar, this creates a site that acts much
like Twitter.

If someone enter the hex value for a color (say #ff0000 for red), I
would like for ROR to convert that to an HTML color box representation
in
the post that is created. Any ideas on how to accomplish this?

Thanks in advance for the time and help.

Can you explain in a bit more detail what you want? I am not sure
what you mean by converting #ff0000 to a colour box representation.

Colin

Hey Colin. Thanks for trying to help me out. I mean that if someone
enters #ff0000 into the microblog post and submits the post, a box with
the color red will appear instead of the text #ff0000. Make sense?

Please remember to quote the previous message as this is a mailing
list not a forum (though you may be accessing it via a forum like
interface).

So you want to save the colour value in a field in the database and
then on the next page displayed show something in that colour?

Presumably you know how to save it in the database. Do you know how
to control style (layout, colours etc) using CSS? If not then the
first thing to do is to find some tutorials on CSS. Once you
understand static styling then google for Rails Dynamic CSS to give
you some ideas on how to make it dynamic.

Colin