---
title: "setBlendColor(red:green:blue:alpha:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4rendercommandencoder/setblendcolor(red:green:blue:alpha:)"
---

# setBlendColor(red:green:blue:alpha:)

Configures each pixel component value, including alpha, for the render pipeline’s constant blend color.

## Declaration

```swift
func setBlendColor(red: Float, green: Float, blue: Float, alpha: Float)
```

## Parameters

- `red`: A value for the red component for the blend color constant.
- `green`: A value for the green component for the blend color constant.
- `blue`: A value for the blue component for the blend color constant.
- `alpha`: A value for the alpha component for the blend color constant.

## See Also

### Configuring blend behavior

- [setColorAttachmentMap(_:)](metal/mtl4rendercommandencoder/setcolorattachmentmap(_:).md)
