---
title: "radialGradient(_:startCenter:startRadius:endCenter:endRadius:options:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/graphicscontext/shading/radialgradient(_:startcenter:startradius:endcenter:endradius:options:)"
---

# radialGradient(_:startCenter:startRadius:endCenter:endRadius:options:)

Returns a shading that fills a two-point radial gradient.

## Declaration

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

## Parameters

- `gradient`: An doc://com.apple.SwiftUI/documentation/SwiftUI/AnyGradient instance that defines the colors of the gradient.
- `startCenter`: The strat point in the current user space on which SwiftUI centers the gradient.
- `startRadius`: The distance from the center where the gradient starts.
- `endCenter`: The end point in the current user space on which SwiftUI centers the gradient.
- `endRadius`: The distance from the center where the gradient ends.
- `options`: Options that you use to configure the gradient.

## Return Value

Return Value A shading instance filled with a radial gradient.
