---
title: colorPixelFormat
framework: metalkit
role: symbol
role_heading: Instance Property
path: metalkit/mtkview/colorpixelformat
---

# colorPixelFormat

The color pixel format for the current drawable’s texture.

## Declaration

```swift
var colorPixelFormat: MTLPixelFormat { get set }
```

## Discussion

Discussion The pixel format must be one that the underlying CAMetalLayer can use. See pixelFormat. The default value is MTLPixelFormat.bgra8Unorm.

## See Also

### Configuring the Color Render Target

- [colorspace](metalkit/mtkview/colorspace.md)
- [framebufferOnly](metalkit/mtkview/framebufferonly.md)
- [drawableSize](metalkit/mtkview/drawablesize.md)
- [preferredDrawableSize](metalkit/mtkview/preferreddrawablesize.md)
- [autoResizeDrawable](metalkit/mtkview/autoresizedrawable.md)
- [clearColor](metalkit/mtkview/clearcolor.md)
