---
title: "meshGradient(_:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/graphicscontext/shading/meshgradient(_:)"
---

# meshGradient(_:)

Returns a shading instance that fills with a mesh gradient.

## Declaration

```swift
static func meshGradient(_ mesh: MeshGradient) -> GraphicsContext.Shading
```

## Parameters

- `mesh`: The mesh gradient defining the filled colors.

## Return Value

Return Value A shading that fills using the mesh gradient.
