<!--
{
  "availability" : [
    "watchOS: 2.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ClockKit",
  "identifier" : "/documentation/ClockKit/CLKImageProvider/init(onePieceImage:twoPieceImageBackground:twoPieceImageForeground:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ClockKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CLKImageProvider(cm)imageProviderWithOnePieceImage:twoPieceImageBackground:twoPieceImageForeground:"
  },
  "title" : "init(onePieceImage:twoPieceImageBackground:twoPieceImageForeground:)"
}
-->

# init(onePieceImage:twoPieceImageBackground:twoPieceImageForeground:)

Creates and returns an image provider with both one-piece and two-piece images.

```
convenience init(onePieceImage: UIImage, twoPieceImageBackground: UIImage?, twoPieceImageForeground: UIImage?)
```

## Parameters

`onePieceImage`

The one-piece image to use. The image must be a template image, where only the alpha channel is used to define the image contents. This parameter must not be `nil`.

`twoPieceImageBackground`

The background to use for a two-piece image. The image must be a template image, where only the alpha channel is used to define the image contents. This parameter must not be `nil`.

`twoPieceImageForeground`

The foreground to use for a two-piece image. The image must be a template image, where only the alpha channel is used to define the image contents. This parameter must not be `nil`.

## Return Value

An image provider with both the one-piece and two-piece images.

## Discussion

Use this method when you want to display a two-piece image in multicolor environments. In monochrome environments, the image provider still displays the one-piece image. After creating the image provider, you can customize the tint color applied to your images by modifying the [`tintColor`](/documentation/ClockKit/CLKImageProvider/tintColor) property.

---

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)