Initializer

init(name:)

Initializes and returns the receiver, registering it under the given name if it isn’t in use already.

Declaration

init(name: NSColorList.Name)

Parameters

name

The name under which to register the color list. Specify @”” if you don’t want a name.

Return Value

The initialized color list.

Discussion

This method invokes init(name:fromFile:) with a fromFile: argument of nil, indicating that the color list doesn’t need to be initialized from a file. Note that this method does not add the color list to availableColorLists until the color list is saved into the user’s path with write(toFile:) with a value of nil.

See Also

Creating a Color List

init?(name: NSColorList.Name, fromFile: String?)

Initializes and returns the receiver, registering it under the given name if it isn’t in use already.