---
title: "init(patternImage:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nscolor/init(patternimage:)"
---

# init(patternImage:)

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

## Declaration

```swift
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

Return Value The NSColor object. This color object is autoreleased.

## See Also

### Creating a pattern-based color

- [patternImage](appkit/nscolor/patternimage.md)
