---
title: "grayscale(_:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/graphicscontext/filter/grayscale(_:)"
---

# grayscale(_:)

Returns a filter that applies a grayscale adjustment.

## Declaration

```swift
static func grayscale(_ amount: Double) -> GraphicsContext.Filter
```

## Parameters

- `amount`: An amount that controls the effect. A value of one makes the image completely gray. A value of zero leaves the result unchanged. Other values apply a linear multiplier effect.

## Return Value

Return Value A filter that applies a grayscale adjustment.

## Discussion

Discussion This filter is equivalent to the grayscale filter primitive defined by the Scalable Vector Graphics (SVG) specification.

## See Also

### Manipulating color

- [saturation(_:)](swiftui/graphicscontext/filter/saturation(_:).md)
- [colorInvert(_:)](swiftui/graphicscontext/filter/colorinvert(_:).md)
- [colorMultiply(_:)](swiftui/graphicscontext/filter/colormultiply(_:).md)
- [hueRotation(_:)](swiftui/graphicscontext/filter/huerotation(_:).md)
- [colorMatrix(_:)](swiftui/graphicscontext/filter/colormatrix(_:).md)
