---
title: "palette(_:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/graphicscontext/shading/palette(_:)"
---

# palette(_:)

Returns a multilevel shading instance constructed from an array of shading instances.

## Declaration

```swift
static func palette(_ array: [GraphicsContext.Shading]) -> GraphicsContext.Shading
```

## Parameters

- `array`: An array of shading instances. The array must contain at least one element.

## Return Value

Return Value A shading instance composed from the given instances.

## See Also

### Composite shading types

- [backdrop](swiftui/graphicscontext/shading/backdrop.md)
