public static string Parse([NotNull] string color) {
if (color == null) throw new ArgumentNullException("color");
switch (color.Length) {
case 2:
if (color[0] == '&') {
return Parse(color[1]);
}
break;
case 1:
return Parse(color[0]);
case 0:
return "";
}
color = color.ToLower();
if (ColorNames.ContainsValue(color)) {
return "&" + ColorNames.Keys[ColorNames.IndexOfValue(color)];
} else {
return null;
}
}