---
title: MTLColorWriteMask
framework: metal
role: symbol
role_heading: Structure
path: metal/mtlcolorwritemask
---

# MTLColorWriteMask

Values used to specify a mask to permit or restrict writing to color channels of a color value.

## Declaration

```swift
struct MTLColorWriteMask
```

## Overview

Overview The values red, green, blue, and alpha select one color channel each, and they can be bitwise combined.

## Topics

### Initializers

- [init(rawValue:)](metal/mtlcolorwritemask/init(rawvalue:).md)

### Type Properties

- [all](metal/mtlcolorwritemask/all.md)
- [alpha](metal/mtlcolorwritemask/alpha.md)
- [blue](metal/mtlcolorwritemask/blue.md)
- [green](metal/mtlcolorwritemask/green.md)
- [red](metal/mtlcolorwritemask/red.md)
- [unspecialized](metal/mtlcolorwritemask/unspecialized.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Configuring render pipeline states

- [pixelFormat](metal/mtlrenderpipelinecolorattachmentdescriptor/pixelformat.md)
- [writeMask](metal/mtlrenderpipelinecolorattachmentdescriptor/writemask.md)
