---
title: "subscript(_:)"
framework: metal
role: symbol
role_heading: Instance Subscript
path: "metal/mtlrenderpasscolorattachmentdescriptorarray/subscript(_:)"
---

# subscript(_:)

Returns the descriptor object for the specified color attachment.

## Declaration

```swift
subscript(attachmentIndex: Int) -> MTLRenderPassColorAttachmentDescriptor! { get set }
```

## Parameters

- `attachmentIndex`: An index in the color attachment array.

## Return Value

Return Value A descriptor object that contains color attachment information.
