<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIImage/SymbolConfiguration-swift.class/init(paletteColors:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIImageSymbolConfiguration(cm)configurationWithPaletteColors:"
  },
  "title" : "init(paletteColors:)"
}
-->

# init(paletteColors:)

Creates a color configuration with a color scheme from a palette of multiple colors.

```
convenience init(paletteColors: [UIColor])
```

## Parameters

`paletteColors`

The colors to apply to the symbol.

## Discussion

When you create an image with this configuration, the system applies each color to the corresponding layer in the symbol layer hierarchy.

If the symbol has only two nonconsecutive layers (primary and tertiary), specifying two colors applies the second color to the tertiary layer. Specifying three colors ignores the second color and applies the third color to the tertiary layer.

For this color configuration to have an effect, your symbol image must have the following:

- Its [`renderingMode`](/documentation/UIKit/UIImage/renderingMode-swift.property) set to [`UIImage.RenderingMode.alwaysTemplate`](/documentation/UIKit/UIImage/RenderingMode-swift.enum/alwaysTemplate) or [`UIImage.RenderingMode.automatic`](/documentation/UIKit/UIImage/RenderingMode-swift.enum/automatic).
- Hierarchical layer annotations. If your symbol doesn’t have hierarchical layer annotations, the resulting image is a monochrome (template) symbol image.

This color configuration can’t combine with hierarchical color configurations that you create with [`init(hierarchicalColor:)`](/documentation/UIKit/UIImage/SymbolConfiguration-swift.class/init(hierarchicalColor:)). If you attempt to combine this configuration with a hierarchical color configuration, the last configuration that you specify takes precedence, overwriting the previous color configuration.

---

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)