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

# init(patternImage:)

Creates a color object that uses the specified image pattern to paint the target area.

```
init(patternImage image: NSImage)
```

## Parameters

`image`

The image to use as the pattern for the color object. The image is tiled starting at the bottom of the window. The image is not scaled.

## Return Value

The `NSColor` object. This color object is autoreleased.

---

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)