---
title: "color(_:pixelFormat:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/textureresource/format/color(_:pixelformat:)"
---

# color(_:pixelFormat:)

Indicates that a texture contains color data to interpret in a specific color space.

## Declaration

```swift
static func color(_ colorSpace: TextureResource.Format.ColorSpace, pixelFormat: MTLPixelFormat) -> TextureResource.Format
```

## Discussion

Discussion The created texture uses the TextureResource.Semantic.color or TextureResource.Semantic.hdrColor semantic.

## See Also

### Creating the format

- [normal(_:pixelFormat:)](realitykit/textureresource/format/normal(_:pixelformat:).md)
- [raw(pixelFormat:)](realitykit/textureresource/format/raw(pixelformat:).md)
