---
title: colorPixelFormat
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnscenerenderer/colorpixelformat
---

# colorPixelFormat

The Metal pixel format for the renderer’s color output.

## Declaration

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

## Discussion

Discussion Use this property, along with the depthPixelFormat and stencilPixelFormat properties, if you perform custom drawing with Metal (see the SCNSceneRendererDelegate and SCNNodeRendererDelegate classes) and need to create a new MTLRenderPipelineState object to change the GPU state as part of your rendering. note: This property is valid only for scene renderers whose renderingAPI value is SCNRenderingAPI.metal. You create a SceneKit view that renders using Metal with the preferredRenderingAPI initialization option or in Interface Builder, or an SCNRenderer that uses Metal with the init(device:options:) method. For OpenGL-based scene renderers, this property’s value is always nil.

## See Also

### Customizing Scene Rendering with Metal

- [currentRenderCommandEncoder](scenekit/scnscenerenderer/currentrendercommandencoder.md)
- [device](scenekit/scnscenerenderer/device.md)
- [commandQueue](scenekit/scnscenerenderer/commandqueue.md)
- [depthPixelFormat](scenekit/scnscenerenderer/depthpixelformat.md)
- [stencilPixelFormat](scenekit/scnscenerenderer/stencilpixelformat.md)
