<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ShapeStyle/conicGradient(_:center:angle:)-2f9fy",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10ShapeStylePA2A15AngularGradientVRszrlE05conicF0_6center5angleQrAA03AnyF0V_AA9UnitPointVAA5AngleVtFZ"
  },
  "title" : "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.

```
@export(implementation) 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

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

---

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)