Use the tool below to help you select Web Safe colours. At the lower right hand side you will find a conversion tool to change RGB to HEX colours and back. When the conversion takes place, the tool also offers some close Web Safe alternatives.
The large blocks of colour should be used to build up a basic palette for your web page and then CSS can be cut and paste from the box at the bottom.
If anyone has formulae for converting to other colour spaces, please get in touch.