---
title: "blendMode(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/blendmode(_:)"
---

# blendMode(_:)

Sets the blend mode for compositing this view with overlapping views.

## Declaration

```swift
nonisolated func blendMode(_ blendMode: BlendMode) -> some View

```

## Parameters

- `blendMode`: The doc://com.apple.SwiftUI/documentation/SwiftUI/BlendMode for compositing this view.

## Return Value

Return Value A view that applies blendMode to this view.

## Discussion

Discussion Use blendMode(_:) to combine overlapping views and use a different visual effect to produce the result. The BlendMode enumeration defines many possible effects. In the example below, the two overlapping rectangles have a BlendMode.colorBurn effect applied, which effectively removes the non-overlapping portion of the second image: HStack {     Color.yellow.frame(width: 50, height: 50, alignment: .center)

Color.red.frame(width: 50, height: 50, alignment: .center)         .rotationEffect(.degrees(45))         .padding(-20)         .blendMode(.colorBurn) }

## See Also

### Compositing views

- [compositingGroup()](swiftui/view/compositinggroup().md)
- [drawingGroup(opaque:colorMode:)](swiftui/view/drawinggroup(opaque:colormode:).md)
- [BlendMode](swiftui/blendmode.md)
- [ColorRenderingMode](swiftui/colorrenderingmode.md)
- [CompositorContent](swiftui/compositorcontent.md)
- [CompositorContentBuilder](swiftui/compositorcontentbuilder.md)
- [AnyCompositorContent](swiftui/anycompositorcontent.md)
