Converting colour in Windows Phone
===

In my Windows Phone application I get the colour from xml and then bind it to some element. I have found that I get the wrong colour in my case. Here is my code:

 

    var resources = feedsModule.getResources().getColorResource("HeaderColor") ??
                                       FeedHandler.GetInstance().MainApp.getResources().getColorResource("HeaderColor");
                    if (resources != null)
                    {
                        var colourText = Color.FromArgb(255, Convert.ToByte(resources.getValue().Substring(1, 2), 16),
                                                                               Convert.ToByte(resources.getValue().Substring(3, 2), 16),
    
                                                                               Convert.ToByte(resources.getValue().Substring(5, 2), 16));

So after converting the colour, I get the wrong result. In xml I have this one:

     <Color name="HeaderColor">#0000FF</Color>

and it converts into `#FF0000FF`