A possible alternative solution. I say possible because I have no idea if it will work in Silverlight and even if it does whether it will be any easier/faster.
public Color ColorFromName(string name)
{
Color result = Colors.Black;
Type type = typeof(Brushes);
foreach (PropertyInfo propertyInfo in type.GetProperties(BindingFlags.Public | BindingFlags.Static))
{
if (propertyInfo.PropertyType == typeof(SolidColorBrush))
{
if (propertyInfo.Name.ToLower() == name.ToLower())
{
result = ((SolidColorBrush)propertyInfo.GetValue(null, null)).Color;
break;
}
}
}
return result;
}