<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColorList/init(name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSColorList(im)initWithName:"
  },
  "title" : "init(name:)"
}
-->

# init(name:)

Initializes and returns a color list, registering it under the specified name if it isn’t in use already.

```
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:)`](/documentation/AppKit/NSColorList/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`](/documentation/AppKit/NSColorList/availableColorLists) until the color list is saved into the user’s path with [`write(toFile:)`](/documentation/AppKit/NSColorList/write(toFile:)) with a value of `nil`.

## See Also

[`init(name:fromFile:)`](/documentation/AppKit/NSColorList/init(name:fromFile:))

Initializes and returns a color list from the specified file, registering it under the specified name if it isn’t in use already.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)