---
title: "setBlendMode(_:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/setblendmode(_:)"
---

# setBlendMode(_:)

Sets how sample values are composited by a graphics context.

## Declaration

```swift
func setBlendMode(_ mode: CGBlendMode)
```

## Parameters

- `mode`: A blend mode. See doc://com.apple.coregraphics/documentation/CoreGraphics/CGBlendMode for a list of the constants you can supply.

## See Also

### Managing a Graphics Context

- [flush()](coregraphics/cgcontext/flush().md)
- [synchronize()](coregraphics/cgcontext/synchronize().md)
- [CGBlendMode](coregraphics/cgblendmode.md)
- [setRenderingIntent(_:)](coregraphics/cgcontext/setrenderingintent(_:).md)
