Source/NFX/Media/PDF/Styling/PdfColor.cs
/// <summary>
/// Returns existing color by name or throws if it is not found
/// </summary>
Returns existing color by name or throws if it is not found
Returns existing color by name or throws if it is not found
public static PdfColor ByName(string name)
      {
        if (name.IsNullOrWhiteSpace())
          throw new PdfException(StringConsts.ARGUMENT_ERROR + typeof(PdfColor).Name + ".ByName(name==null|empty)");
        var result = s_Colors[name];
        if (result == null)
          throw new PdfException(StringConsts.PDF_COLOR_DOESNOTEXIST_ERROR.Args(name));
        return result;
      }
public static PdfColor ByName ( string name ) { if ( name . IsNullOrWhiteSpace ( ) ) throw new PdfException ( StringConsts . ARGUMENT_ERROR + typeof ( PdfColor ) . Name + " " ) ; var result = s_Colors [ name ] ; if ( result == null ) throw new PdfException ( StringConsts . PDF_COLOR_DOESNOTEXIST_ERROR . Args ( name ) ) ; return result ; }
Returns existing color by name or throws if it is not found
Returns existing color by name or throws if it is not found
name
string