---
title: MTLPixelFormat.bgra10_xr
framework: metal
role: symbol
role_heading: Case
path: metal/mtlpixelformat/bgra10_xr
---

# MTLPixelFormat.bgra10_xr

A 64-bit extended-range pixel format with four fixed-point components of 10-bit blue, 10-bit green, 10-bit red, and 10-bit alpha.

## Declaration

```swift
case bgra10_xr
```

## Discussion

Discussion Pixel components are in blue, green, red, and alpha order, from least significant bit to most significant bit (little-endian order). Each component is a 16-bit chunk arranged as follows: The 10 most-significant bits (bits 6–15) store the component’s data. The 6 least-significant bits (bits 0–5) are padding, and their value is 0.

The blue, green, and red components are linearly encoded in a transform from [0,2^10) to [-0.752941, 1.25098]. The formula used in this linear encoding is shader_float = (xr10_value - 384) / 510.0f. tip: Each UNorm8-based pixel value has an exact corresponding value in the XR10 pixel range, given by xr10_value = unorm8_value * 2 + 384. The alpha component is always clamped to a [0.0, 1.0] range in sampling, rendering, and writing operations, despite supporting values outside this range. To display wide color values on devices with wide color displays, set this pixel format on the colorPixelFormat property of an MTKView or the pixelFormat property of a CAMetalLayer. note: Only devices with a wide color display can display color values outside the [0.0, 1.0] range; all other devices clamp color values to the [0.0, 1.0] range.

## See Also

### Extended range and wide color pixel formats

- [MTLPixelFormat.bgra10_xr_srgb](metal/mtlpixelformat/bgra10_xr_srgb.md)
- [MTLPixelFormat.bgr10_xr](metal/mtlpixelformat/bgr10_xr.md)
- [MTLPixelFormat.bgr10_xr_srgb](metal/mtlpixelformat/bgr10_xr_srgb.md)
