Click here to Skip to main content
15,896,359 members
Articles / Silverlight

Color Code to SolidColor Conversion

10 Jan 2012CPOL 1.5K   2
A slight improvement over AdamDavidHill's version:public static SolidColorBrush GetColor(string s){ return new SolidColorBrush(ColorTranslator.FromHtml(s));}While it won't handle a missing "#", it is reusing what is built in already into .NET.
Only logged in members can view this content

Please go to the Silverlight Table of Contents to view the list of available articles in this section.