Store the hex color in a database field nvarchar(7)
... the input would be #ffffff
as an example.
EDIT: varchar(7)
would work just as well, and take up less space in your DB.
You could also do varchar(6)
if you're super concerned about db size and append the # symbol in code.
EDIT: if you need to convert it to a control color, you can use System.Drawing.ColorTranslator.FromHtml("")
Dim MyColor as string = '[retrieve from database]
MyControlColor = System.Drawing.ColorTranslator.FromHtml(MyColor)
Now, this is untested but you could try the following function to convert the System.Drawing.Color TO a Hex code.
Private Function GetHexColor(colorObj as System.Drawing.Color) as String
return "#" & Hex(colorObj.R) & Hex(colorObj.G) & Hex(colorObj.B)
End function