<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/GraphicsContext/Shading/radialGradient(_:center:startRadius:endRadius:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15GraphicsContextV7ShadingV14radialGradient_6center11startRadius03endJ07optionsAeA03AnyG0V_So7CGPointV14CoreFoundation7CGFloatVAqC0G7OptionsVtFZ::OverloadGroup"
  },
  "title" : "radialGradient(_:center:startRadius:endRadius:options:)"
}
-->

# radialGradient(_:center:startRadius:endRadius:options:)

Returns a shading instance that fills a radial gradient.

```
static func radialGradient(_ gradient: AnyGradient, center: CGPoint, startRadius: CGFloat, endRadius: CGFloat, options: GraphicsContext.GradientOptions = GradientOptions()) -> GraphicsContext.Shading
```

## Parameters

`gradient`

An [`AnyGradient`](/documentation/SwiftUI/AnyGradient) instance that defines the colors
of the gradient.

`center`

The point in the current user space on which SwiftUI
centers the gradient.

`startRadius`

The distance from the center where the gradient
starts.

`endRadius`

The distance from the center where the gradient ends.

`options`

Options that you use to configure the gradient.

## Return Value

A shading instance filled with a radial gradient.

---

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)