public static string GetName( char code ) { code = Char.ToLower( code ); if ( IsValidColorCode( code ) ) { return ColorNames[code]; } string color = Parse( code ); if ( color == null ) { return null; } return ColorNames[color[1]]; }
public override string GetPresentationString(string value) { if (value == null) { throw new ArgumentNullException("value"); } return(String.Format("{0} ({1})", Color.GetName(value), Color.Parse(value))); }