---
title: "CVImageBufferGetColorSpace(_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvimagebuffergetcolorspace(_:)"
---

# CVImageBufferGetColorSpace(_:)

Returns the color space of a Core Video image buffer.

## Declaration

```swift
func CVImageBufferGetColorSpace(_ imageBuffer: CVImageBuffer) -> Unmanaged<CGColorSpace>?
```

## Parameters

- `imageBuffer`: The image buffer containing the color space to retrieve.

## Return Value

Return Value The color space of the image buffer, or nil if you pass a value for the image buffer that isn’t a CVImageBuffer type.

## See Also

### Inspecting image buffers

- [CVImageBufferGetCleanRect(_:)](corevideo/cvimagebuffergetcleanrect(_:).md)
- [CVImageBufferGetDisplaySize(_:)](corevideo/cvimagebuffergetdisplaysize(_:).md)
- [CVImageBufferGetEncodedSize(_:)](corevideo/cvimagebuffergetencodedsize(_:).md)
- [CVImageBufferIsFlipped(_:)](corevideo/cvimagebufferisflipped(_:).md)
