/// <summary> /// Adds a new spot color to the list. /// </summary> /// <param name="name">The spot color name.</param> /// <param name="pcs">An array of 3 values encoding the PCS coordinates.</param> /// <param name="colorant">An array of 16 values encoding the device colorant.</param> /// <returns>true if the spot color was added to the list, otherwise false.</returns> /// <exception cref="ObjectDisposedException"> /// The named color list has already been disposed. /// </exception> public bool Add(string name, ushort[] pcs, ushort[] colorant) { if (pcs?.Length != 3) { throw new ArgumentException($"'{nameof(pcs)}' array size must equal 3."); } if (colorant?.Length != 16) { throw new ArgumentException($"'{nameof(colorant)}' array size must equal 16."); } EnsureNotClosed(); return(Interop.AppendNamedColor(handle, name, pcs, colorant) != 0); }