<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ShapeStyle/radialGradient(stops:center:startRadius:endRadius:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10ShapeStylePA2A14RadialGradientVRszrlE06radialF05stops6center11startRadius03endK0AESayAA0F0V4StopVG_AA9UnitPointV14CoreFoundation7CGFloatVATtFZ"
  },
  "title" : "radialGradient(stops:center:startRadius:endRadius:)"
}
-->

# radialGradient(stops:center:startRadius:endRadius:)

A radial gradient defined by a collection of color stops.

```
@export(implementation) static func radialGradient(stops: [Gradient.Stop], center: UnitPoint, startRadius: CGFloat, endRadius: CGFloat) -> RadialGradient
```

## Discussion

The gradient applies the color function as the distance from a center
point, scaled to fit within the defined start and end radii. The
gradient maps the unit space center point into the bounding rectangle of
each shape filled with the gradient.

For information about how to use shape styles, see [`ShapeStyle`](/documentation/SwiftUI/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)