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

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

Returns a shading instance that fills a radial gradient.

## Declaration

```swift
static func radialGradient(_ gradient: AnyGradient, center: CGPoint, startRadius: CGFloat, 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.
- `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

Return Value A shading instance filled with a radial gradient.

## See Also

### Gradients

- [linearGradient(_:startPoint:endPoint:options:)](swiftui/graphicscontext/shading/lineargradient(_:startpoint:endpoint:options:).md)
- [conicGradient(_:center:angle:options:)](swiftui/graphicscontext/shading/conicgradient(_:center:angle:options:).md)
