---
title: "conicGradient(_:center:angle:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/shapestyle/conicgradient(_:center:angle:)"
---

# conicGradient(_:center:angle:)

A conic gradient that completes a full turn, optionally starting from a given angle and anchored to a relative center point within the filled shape.

## Declaration

```swift
static func conicGradient(_ gradient: AnyGradient, center: UnitPoint = .center, angle: Angle = .zero) -> some ShapeStyle

```

## Parameters

- `gradient`: The gradient to use for filling the shape, providing the colors and their relative stop locations.
- `center`: The relative center of the gradient, mapped from the unit space into the bounding rectangle of the filled shape.
- `angle`: The angle to offset the beginning of the gradient’s full turn.

## Discussion

Discussion For example, a conic gradient used as a background: let gradient = Gradient(colors: [.red, .yellow])

ContentView()     .background(.conicGradient(gradient)) For information about how to use shape styles, see ShapeStyle.

## See Also

### Conic gradients

- [conicGradient(colors:center:angle:)](swiftui/shapestyle/conicgradient(colors:center:angle:).md)
- [conicGradient(stops:center:angle:)](swiftui/shapestyle/conicgradient(stops:center:angle:).md)
