Jim McCurdy's Tech Blog

Insights into C#/XAML Development; Windows 8 (WinRT), WPF, Windows Phone, Xamarin, Silverlight

ColorFromString for Silverlight or .NET

Here is a simple static class, ColorFromString, that offers a single string extension method, ToColor, to create Color objects from various strings representations of color: Named colors “Red” “Yellow” “Chartreuse” ARGB colors as Hex (8 nibbles) “#FF00FF00” for opaque green “#80FF00FF” for translucent magenta RGB c... [More]