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

# subscript(_:)

Returns the render pipeline state for the specified color attachment.

## Declaration

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

## Parameters

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

## Return Value

Return Value An MTLRenderPipelineColorAttachmentDescriptor instance that describes the render pipeline information for a color attachment.

## See Also

### Related Documentation

- [Metal Shading Language Guide](apple-archive/documentation/Metal/Reference/MetalShadingLanguageGuide/Introduction.md)
- [Metal Programming Guide](apple-archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/Introduction.md)
