I am writing a VB.NET app that displays a colordialog and then captures the name of a color and saves it in an XML file. The code if use is something like this:
dim fColor as String=colorDialog1.Color.Name
This works fine. However, how do I convert the string value back into a color? I have tried:
lblSample.BackColor = Color.FromKnownColor(fColor) but this only works for colors where the name property returns "Red", "Blue", "Green", etc. It does not seem to work for colors where the name property returns strings like ff804040 or ffff8000.
Any help will be greatly appreciated!!!