I am working on a windows phone game, and I got stuck when I wanted to convert a HEX string into Color. On windows phone 8 silverlight it is not a problem but I cannot find a solution in runtime because it doesn't include Color.FromArgb, or Color.FromName functions.
Does somebody have a function that converts string HEX to Color?
Thanks.
Color.FromArgb is in the Windows.UI namespace. There isn't a Color.FromName method, but you can use the Colors.< name > properties or you can use reflection to look up the name from a string.
Here is an easy to use code snippet
and you can simply call like the below one
I tested this in winphone 8.1 and it works
Reference